Skip to content

Commit 8209ccb

Browse files
TrottMylesBorins
authored andcommittedSep 25, 2018
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: #22888 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 52b21ca commit 8209ccb

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
@@ -610,11 +610,11 @@ try {
610610
}
611611

612612
try {
613-
assert.strictEqual(1, 2, 'oh no');
613+
assert.strictEqual(1, 2, 'oh no'); // eslint-disable-line no-restricted-syntax
614614
} catch (e) {
615615
assert.strictEqual(e.message.split('\n')[0], 'oh no');
616-
assert.strictEqual(e.generatedMessage, false,
617-
'Message incorrectly marked as generated');
616+
// Message should not be marked as generated.
617+
assert.strictEqual(e.generatedMessage, false);
618618
}
619619

620620
{

0 commit comments

Comments
 (0)
Please sign in to comment.