Skip to content

Commit b359a7a

Browse files
addaleaxBethGriggs
authored andcommitted
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 115f0f5 pass when that is the case. Refs: #26823 PR-URL: #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>
1 parent 079368a commit b359a7a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/sequential/test-module-loading.js

+3
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ const path = require('path');
2929

3030
const backslash = /\\/g;
3131

32+
if (!process.env.NODE_PENDING_DEPRECATION)
33+
process.on('warning', common.mustNotCall());
34+
3235
console.error('load test-module-loading.js');
3336

3437
assert.strictEqual(require.main.id, '.');

0 commit comments

Comments
 (0)