test: add process no deprecation
PR-URL: https://github.com/nodejs/node/pull/24196 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
parent
3235d318dc
commit
6ae6383fdc
15
test/parallel/test-child-process-no-deprecation.js
Normal file
15
test/parallel/test-child-process-no-deprecation.js
Normal file
@ -0,0 +1,15 @@
|
||||
'use strict';
|
||||
const common = require('../common');
|
||||
process.noDeprecation = true;
|
||||
|
||||
if (process.argv[2] === 'child') {
|
||||
process.emitWarning('Something else is deprecated.', 'DeprecationWarning');
|
||||
} else {
|
||||
// parent process
|
||||
const spawn = require('child_process').spawn;
|
||||
|
||||
// spawn self as child
|
||||
const child = spawn(process.execPath, [process.argv[1], 'child']);
|
||||
|
||||
child.stderr.on('data', common.mustNotCall());
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user