Skip to content

Commit be90638

Browse files
Daniel Simsaddaleax
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‎

Lines changed: 5 additions & 5 deletions
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-
varassert=require('assert');
5+
constassert=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-
vardomain=require('domain');
11-
vard=domain.create();
10+
constdomain=require('domain');
11+
constd=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)