Skip to content

Commit

Permalink
test: remove string argument to strictEqual()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hariss096 authored and targos committed Sep 10, 2018
1 parent c3c5141 commit 649288b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/sequential/test-crypto-timing-safe-equal.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ if (!common.hasCrypto)
const assert = require('assert');
const crypto = require('crypto');

// 'should consider equal strings to be equal'
assert.strictEqual(
crypto.timingSafeEqual(Buffer.from('foo'), Buffer.from('foo')),
true,
'should consider equal strings to be equal'
true
);

// 'should consider unequal strings to be unequal'
assert.strictEqual(
crypto.timingSafeEqual(Buffer.from('foo'), Buffer.from('bar')),
false,
'should consider unequal strings to be unequal'
false
);

common.expectsError(
Expand Down

0 comments on commit 649288b

Please sign in to comment.