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: https://github.com/nodejs/node/pull/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>
This commit is contained in:
parent
a456775efa
commit
1b438a7737
@ -27,8 +27,7 @@ const assert = require('assert');
|
|||||||
const timeoutd = domain.create();
|
const timeoutd = domain.create();
|
||||||
|
|
||||||
timeoutd.on('error', common.mustCall(function(e) {
|
timeoutd.on('error', common.mustCall(function(e) {
|
||||||
assert.strictEqual(e.message, 'Timeout UNREFd',
|
assert.strictEqual(e.message, 'Timeout UNREFd');
|
||||||
'Domain should catch timer error');
|
|
||||||
clearTimeout(timeout);
|
clearTimeout(timeout);
|
||||||
}, 2));
|
}, 2));
|
||||||
|
|
||||||
@ -47,8 +46,7 @@ t.unref();
|
|||||||
const immediated = domain.create();
|
const immediated = domain.create();
|
||||||
|
|
||||||
immediated.on('error', common.mustCall(function(e) {
|
immediated.on('error', common.mustCall(function(e) {
|
||||||
assert.strictEqual(e.message, 'Immediate Error',
|
assert.strictEqual(e.message, 'Immediate Error');
|
||||||
'Domain should catch immediate error');
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
immediated.run(function() {
|
immediated.run(function() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user