diff options
author | Daniel Sims <danielsims@quickenloans.com> | 2016-12-01 10:02:15 -0600 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2016-12-07 09:42:13 -0800 |
commit | b0c10a24a648af09605c8cf859ea02cc5629afc9 (patch) | |
tree | e93ef1dd3d5a54713f55cc74944b930f4aec2480 /test/parallel/test-domain-from-timer.js | |
parent | ac78812f7fac70f21e63b5fa8b0b94ea5fdfe9d3 (diff) | |
download | node-new-b0c10a24a648af09605c8cf859ea02cc5629afc9.tar.gz |
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: https://github.com/nodejs/node/pull/9889
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'test/parallel/test-domain-from-timer.js')
-rw-r--r-- | test/parallel/test-domain-from-timer.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/parallel/test-domain-from-timer.js b/test/parallel/test-domain-from-timer.js index f0115018ec..2ffae758ef 100644 --- a/test/parallel/test-domain-from-timer.js +++ b/test/parallel/test-domain-from-timer.js @@ -2,17 +2,17 @@ // Simple tests of most basic domain functionality. require('../common'); -var assert = require('assert'); +const assert = require('assert'); // timeouts call the callback directly from cc, so need to make sure the // domain will be used regardless setTimeout(function() { - var domain = require('domain'); - var d = domain.create(); + const domain = require('domain'); + const d = domain.create(); d.run(function() { process.nextTick(function() { console.trace('in nexttick', process.domain === d); - assert.equal(process.domain, d); + assert.strictEqual(process.domain, d); }); }); -}); +}, 1); |