The stock childProcess.spawn has an options.env parameter. This completely replaces the ENV rather than overriding existing values. So overriding a few parameters requires an ugly construction like:
{ options: { env: Object.assign({}, process.env, { NODE_ENV: 'test' }) } }