1'use strict'; 2 3require('../common'); 4const assert = require('assert'); 5const cp = require('child_process'); 6 7// Verify that a faulty environment variable throws on bootstrapping. 8// Therefore we do not need any special handling for the child process. 9const child = cp.spawnSync( 10 process.execPath, 11 ['--unhandled-rejections=foobar', __filename] 12); 13 14assert.strictEqual(child.stdout.toString(), ''); 15assert(child.stderr.includes( 16 'invalid value for --unhandled-rejections'), child.stderr); 17