Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit fbdfd60

Browse filesBrowse 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
Copy full SHA for fbdfd60

File tree

Expand file treeCollapse file tree

1 file changed

+15
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+15
-0
lines changed
Open diff view settings
Collapse file
+15Lines changed: 15 additions & 0 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.