Skip to content

Commit be90638

Browse files
Daniel Simsaddaleax
Daniel Sims
authored andcommitted
test: refactor test-domain-from-timer
In this change, the setTimeout needed a second argument, so I set that value to 1. In addition, I changed the assertion to be a strictEquals instead of equals. I changed the var declarations to const in this test. PR-URL: #9889 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 2c5d562 commit be90638

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/parallel/test-domain-from-timer.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
// Simple tests of most basic domain functionality.
33

44
require('../common');
5-
var assert = require('assert');
5+
const assert = require('assert');
66

77
// timeouts call the callback directly from cc, so need to make sure the
88
// domain will be used regardless
99
setTimeout(function() {
10-
var domain = require('domain');
11-
var d = domain.create();
10+
const domain = require('domain');
11+
const d = domain.create();
1212
d.run(function() {
1313
process.nextTick(function() {
1414
console.trace('in nexttick', process.domain === d);
15-
assert.equal(process.domain, d);
15+
assert.strictEqual(process.domain, d);
1616
});
1717
});
18-
});
18+
}, 1);

0 commit comments

Comments
 (0)