Skip to content

Commit 649288b

Browse 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 <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent c3c5141 commit 649288b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

+4-4
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)