Skip to content
Permalink
Browse files

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>
  • Loading branch information...
Hariss096 authored and danbev committed Sep 5, 2018
1 parent 6a9e776 commit 5977f28ebf1855580a2eef46ec609acc6ef5ca07
Showing with 4 additions and 4 deletions.
  1. +4 −4 test/sequential/test-crypto-timing-safe-equal.js
@@ -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(

0 comments on commit 5977f28

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