Skip to content

Commit

Permalink
test: prepare test-assert for strictEqual linting
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Trott authored and targos committed Sep 20, 2018
1 parent 5a06326 commit ff6e4ea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/parallel/test-assert.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,11 +304,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);
}

{
Expand Down

0 comments on commit ff6e4ea

Please sign in to comment.