Skip to content

Commit b6d2819

Browse files
razvanbhBridgeAR
authored andcommitted
test: add process no deprecation
PR-URL: #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>
1 parent 953697a commit b6d2819

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
'use strict';
2+
const common = require('../common');
3+
process.noDeprecation = true;
4+
5+
if (process.argv[2] === 'child') {
6+
process.emitWarning('Something else is deprecated.', 'DeprecationWarning');
7+
} else {
8+
// parent process
9+
const spawn = require('child_process').spawn;
10+
11+
// spawn self as child
12+
const child = spawn(process.execPath, [process.argv[1], 'child']);
13+
14+
child.stderr.on('data', common.mustNotCall());
15+
}

0 commit comments

Comments
 (0)