Skip to content

Commit ff6e4ea

Browse files
Trotttargos
authored andcommitted
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(). Backport-PR-URL: #22912 PR-URL: #22849 Reviewed-By: Teddy Katz <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent 5a06326 commit ff6e4ea

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/parallel/test-assert.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -304,11 +304,11 @@ try {
304304
}
305305

306306
try {
307-
assert.strictEqual(1, 2, 'oh no');
307+
assert.strictEqual(1, 2, 'oh no'); // eslint-disable-line no-restricted-syntax
308308
} catch (e) {
309309
assert.strictEqual(e.message, 'oh no');
310-
assert.strictEqual(e.generatedMessage, false,
311-
'Message incorrectly marked as generated');
310+
// Message should not be marked as generated.
311+
assert.strictEqual(e.generatedMessage, false);
312312
}
313313

314314
{

0 commit comments

Comments
 (0)