11cb0ef41Sopenharmony_ci'use strict'; 21cb0ef41Sopenharmony_ci 31cb0ef41Sopenharmony_cirequire('../common'); 41cb0ef41Sopenharmony_ciconst assert = require('assert'); 51cb0ef41Sopenharmony_ciconst cp = require('child_process'); 61cb0ef41Sopenharmony_ci 71cb0ef41Sopenharmony_ci// Verify that a faulty environment variable throws on bootstrapping. 81cb0ef41Sopenharmony_ci// Therefore we do not need any special handling for the child process. 91cb0ef41Sopenharmony_ciconst child = cp.spawnSync( 101cb0ef41Sopenharmony_ci process.execPath, 111cb0ef41Sopenharmony_ci ['--unhandled-rejections=foobar', __filename] 121cb0ef41Sopenharmony_ci); 131cb0ef41Sopenharmony_ci 141cb0ef41Sopenharmony_ciassert.strictEqual(child.stdout.toString(), ''); 151cb0ef41Sopenharmony_ciassert(child.stderr.includes( 161cb0ef41Sopenharmony_ci 'invalid value for --unhandled-rejections'), child.stderr); 17