Skip to content

Commit fbdfd60

Browse files
razvanbhcodebytere
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 7576a51 commit fbdfd60

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
'use strict';
2+
constcommon=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+
constspawn=require('child_process').spawn;
10+
11+
// spawn self as child
12+
constchild=spawn(process.execPath,[process.argv[1],'child']);
13+
14+
child.stderr.on('data',common.mustNotCall());
15+
}

0 commit comments

Comments
 (0)