mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
test: make module test pass with NODE_PENDING_DEPRECATION
Some people set the `NODE_PENDING_DEPRECATION` environment variable
globally. This makes the test added in 115f0f5a57
pass when that is the case.
Refs: https://github.com/nodejs/node/pull/26823
PR-URL: https://github.com/nodejs/node/pull/27019
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
This commit is contained in:
1 parent
58da8792c5
commit
3fce303c81
1 file changed
+3
@@ -29,6 +29,9 @@ const path = require('path');
|
||||
|
||||
const backslash = /\\/g;
|
||||
|
||||
if (!process.env.NODE_PENDING_DEPRECATION)
|
||||
process.on('warning', common.mustNotCall());
|
||||
|
||||
console.error('load test-module-loading.js');
|
||||
|
||||
assert.strictEqual(require.main.id, '.');
|
||||
|
||||
Reference in new issue
Block a user