Skip to content

Commit bed57ef

Browse files
palash25jasnell
authored andcommitted
test: removes string literals from test-domain-timer.js
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>
1 parent 0b7e626 commit bed57ef

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

test/parallel/test-domain-timers.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ const assert = require('assert');
2727
const timeoutd = domain.create();
2828

2929
timeoutd.on('error', common.mustCall(function(e) {
30-
assert.strictEqual(e.message, 'Timeout UNREFd',
31-
'Domain should catch timer error');
30+
assert.strictEqual(e.message, 'Timeout UNREFd');
3231
clearTimeout(timeout);
3332
}, 2));
3433

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

4948
immediated.on('error', common.mustCall(function(e) {
50-
assert.strictEqual(e.message, 'Immediate Error',
51-
'Domain should catch immediate error');
49+
assert.strictEqual(e.message, 'Immediate Error');
5250
}));
5351

5452
immediated.run(function() {

0 commit comments

Comments
 (0)