Skip to content

Commit

Permalink
test: use assert.strictEqual and fix setTimeout
Browse files Browse the repository at this point in the history
Changes assert.equal to assert.strictEqual in
two places and adds a second argument of 0
to setTimeout

PR-URL: #9957
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
mattcphillips authored and MylesBorins committed Dec 21, 2016
1 parent 45f553e commit 93733cb
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions test/parallel/test-domain-timers.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,22 @@ var timeout;
var timeoutd = domain.create();

timeoutd.on('error', common.mustCall(function(e) {
assert.equal(e.message, 'Timeout UNREFd', 'Domain should catch timer error');
assert.strictEqual(e.message, 'Timeout UNREFd',
'Domain should catch timer error');
clearTimeout(timeout);
}));

timeoutd.run(function() {
setTimeout(function() {
throw new Error('Timeout UNREFd');
}).unref();
}, 0).unref();
});

var immediated = domain.create();

immediated.on('error', common.mustCall(function(e) {
assert.equal(e.message, 'Immediate Error',
'Domain should catch immediate error');
assert.strictEqual(e.message, 'Immediate Error',
'Domain should catch immediate error');
}));

immediated.run(function() {
Expand Down

0 comments on commit 93733cb

Please sign in to comment.