Skip to content

Commit

Permalink
test: removes string literals from test-domain-timer.js
Browse files Browse the repository at this point in the history
String literals from two `assert.strictEquals()` calls were
removed as these string literals did not match the value of
`e.message` when an `AssertionError` occurred. Now the default
error message is displayed when an error occurs.

PR-URL: #20120
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
palash25 authored and jasnell committed Apr 20, 2018
1 parent 0b7e626 commit bed57ef
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions test/parallel/test-domain-timers.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ const assert = require('assert');
const timeoutd = domain.create();

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

Expand All @@ -47,8 +46,7 @@ t.unref();
const immediated = domain.create();

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

immediated.run(function() {
Expand Down

0 comments on commit bed57ef

Please sign in to comment.