From b359a7a7e53bff66e2943096dda02259ab9c8d73 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Sat, 30 Mar 2019 21:23:39 +0100 Subject: [PATCH] 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 Reviewed-By: Colin Ihrig Reviewed-By: Ruben Bridgewater Reviewed-By: Myles Borins --- test/sequential/test-module-loading.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/sequential/test-module-loading.js b/test/sequential/test-module-loading.js index db9d7e9d40ec9a..0ea8a298f40ac1 100644 --- a/test/sequential/test-module-loading.js +++ b/test/sequential/test-module-loading.js @@ -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, '.');