summaryrefslogtreecommitdiff
path: root/test/parallel/test-delayed-require.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/parallel/test-delayed-require.js')
-rw-r--r--test/parallel/test-delayed-require.js16
1 files changed, 6 insertions, 10 deletions
diff --git a/test/parallel/test-delayed-require.js b/test/parallel/test-delayed-require.js
index ceaa23d510..bc110388fc 100644
--- a/test/parallel/test-delayed-require.js
+++ b/test/parallel/test-delayed-require.js
@@ -3,13 +3,9 @@ var common = require('../common');
var path = require('path');
var assert = require('assert');
-var a;
-setTimeout(function() {
- a = require(path.join(common.fixturesDir, 'a'));
-}, 50);
-
-process.on('exit', function() {
- assert.equal(true, 'A' in a);
- assert.equal('A', a.A());
- assert.equal('D', a.D());
-});
+setTimeout(common.mustCall(function() {
+ const a = require(path.join(common.fixturesDir, 'a'));
+ assert.strictEqual(true, 'A' in a);
+ assert.strictEqual('A', a.A());
+ assert.strictEqual('D', a.D());
+}), 50);