summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2019-03-30 21:23:39 +0100
committerZYSzys <zyszys98@gmail.com>2019-04-03 21:57:53 +0800
commit198d7a47c25d2f34440a8bdd40fbf3cc3f80f8ad (patch)
treee9799ff0e634c0ae68adfcb21242db4a4101454d
parent0817840f775032169ddd70c85ac059f18ffcc81c (diff)
downloadnode-new-198d7a47c25d2f34440a8bdd40fbf3cc3f80f8ad.tar.gz
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 115f0f5a57f50f6b039f28a 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>
-rw-r--r--test/sequential/test-module-loading.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/sequential/test-module-loading.js b/test/sequential/test-module-loading.js
index 630830f5dd..5bd8408612 100644
--- a/test/sequential/test-module-loading.js
+++ b/test/sequential/test-module-loading.js
@@ -29,7 +29,8 @@ const path = require('path');
const backslash = /\\/g;
-process.on('warning', common.mustNotCall());
+if (!process.env.NODE_PENDING_DEPRECATION)
+ process.on('warning', common.mustNotCall());
console.error('load test-module-loading.js');