mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
Split the tests so that it's easier to isolate and debug issues, and we can run the test cases in parallel to speed up. Also add more comments about what they are testing. PR-URL: https://github.com/nodejs/node/pull/61571 Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
28 lines
727 B
JavaScript
28 lines
727 B
JavaScript
'use strict';
|
|
|
|
// Tests node::ProcessInitializationFlags::kDisableNodeOptionsEnv works correctly.
|
|
|
|
const common = require('../common');
|
|
const { spawnSyncAndExit } = require('../common/child_process');
|
|
const os = require('os');
|
|
|
|
if (process.config.variables.node_without_node_options) {
|
|
common.skip('NODE_REPL_EXTERNAL_MODULE cannot be tested with --without-node-options');
|
|
}
|
|
|
|
const embedtest = common.resolveBuiltBinary('embedtest');
|
|
spawnSyncAndExit(
|
|
embedtest,
|
|
['require("os")'],
|
|
{
|
|
env: {
|
|
...process.env,
|
|
'NODE_REPL_EXTERNAL_MODULE': 'fs',
|
|
},
|
|
},
|
|
{
|
|
status: 9,
|
|
signal: null,
|
|
stderr: `${embedtest}: NODE_REPL_EXTERNAL_MODULE can't be used with kDisableNodeOptionsEnv${os.EOL}`,
|
|
});
|