Skip to content
Permalink
Browse files

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 <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>
  • Loading branch information...
Trott authored and MylesBorins committed Sep 13, 2018
1 parent 52b21ca commit 8209ccb3132051ed2eaa25f010a96ee902396f04
Showing with 3 additions and 3 deletions.
  1. +3 −3 test/parallel/test-assert.js
@@ -610,11 +610,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.split('\n')[0], 'oh no');
assert.strictEqual(e.generatedMessage, false,
'Message incorrectly marked as generated');
// Message should not be marked as generated.
assert.strictEqual(e.generatedMessage, false);
}

{

0 comments on commit 8209ccb

Please sign in to comment.
You can’t perform that action at this time.