Skip to content

Commit

Permalink
test: make module test pass with NODE_PENDING_DEPRECATION
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
addaleax authored and BethGriggs committed Apr 10, 2019
1 parent 58da879 commit 3fce303
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/sequential/test-module-loading.js
Original file line number Diff line number Diff line change
Expand Up @@ -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, '.');
Expand Down

0 comments on commit 3fce303

Please sign in to comment.