mirror of https://github.com/nodejs/node.git
test: prepare test-assert for strictEqual linting
Make minor modifications to test-assert.js to prepare it for linting rule that forbids the use of string literals for the third argument of assert.strictEqual(). PR-URL: https://github.com/nodejs/node/pull/22849 Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
parent
d12e2f6fcf
commit
9c6e23d10f
|
@ -311,11 +311,11 @@ try {
|
|||
}
|
||||
|
||||
try {
|
||||
assert.strictEqual(1, 2, 'oh no');
|
||||
assert.strictEqual(1, 2, 'oh no'); // eslint-disable-line no-restricted-syntax
|
||||
} catch (e) {
|
||||
assert.strictEqual(e.message, 'oh no');
|
||||
assert.strictEqual(e.generatedMessage, false,
|
||||
'Message incorrectly marked as generated');
|
||||
// Message should not be marked as generated.
|
||||
assert.strictEqual(e.generatedMessage, false);
|
||||
}
|
||||
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue