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 649288b

Browse filesBrowse files
Hariss096targos
authored andcommitted
test: remove string argument to strictEqual()
Removing string literal passed as argument to assert.strictEqual() in order to print the expected value instead of the string. (First issue assigned through Email by Rich Trott) PR-URL: #22718 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent c3c5141 commit 649288b
Copy full SHA for 649288b

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

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

‎test/sequential/test-crypto-timing-safe-equal.js‎

Copy file name to clipboardExpand all lines: test/sequential/test-crypto-timing-safe-equal.js
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ if (!common.hasCrypto)
66
const assert = require('assert');
77
const crypto = require('crypto');
88

9+
// 'should consider equal strings to be equal'
910
assert.strictEqual(
1011
crypto.timingSafeEqual(Buffer.from('foo'), Buffer.from('foo')),
11-
true,
12-
'should consider equal strings to be equal'
12+
true
1313
);
1414

15+
// 'should consider unequal strings to be unequal'
1516
assert.strictEqual(
1617
crypto.timingSafeEqual(Buffer.from('foo'), Buffer.from('bar')),
17-
false,
18-
'should consider unequal strings to be unequal'
18+
false
1919
);
2020

2121
common.expectsError(

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.