Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ff6e4ea

Browse filesBrowse 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 <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>
1 parent 5a06326 commit ff6e4ea
Copy full SHA for ff6e4ea

File tree

Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-assert.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-assert.js
+3-3Lines changed: 3 additions & 3 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.