Skip to content

Commit

Permalink
test: add process no deprecation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
razvanbh authored and gireeshpunathil committed Nov 13, 2018
1 parent 3235d31 commit 6ae6383
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/parallel/test-child-process-no-deprecation.js
Original file line number Diff line number Diff line change
@@ -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());
}

0 comments on commit 6ae6383

Please sign in to comment.