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 9, 2019
1 parent 079368a commit b359a7a
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 b359a7a

Please sign in to comment.