Browse Source

test: update test-crypto-from-binary

removed string literal argument to function call strictEqual
so that default error message is printed

PR-URL: https://github.com/nodejs/node/pull/16011
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
v9.x-staging
Raj Parekh 8 years ago
committed by James M Snell
parent
commit
7bc6dd02a4
  1. 4
      test/parallel/test-crypto-from-binary.js

4
test/parallel/test-crypto-from-binary.js

@ -54,12 +54,12 @@ const b = Buffer.from(ucs2_control + ucs2_control, 'ucs2');
.update(datum1.toString('base64'), 'base64')
.digest('hex');
const hash1_direct = crypto.createHash('sha1').update(datum1).digest('hex');
assert.strictEqual(hash1_direct, hash1_converted, 'should hash the same.');
assert.strictEqual(hash1_direct, hash1_converted);
const datum2 = b;
const hash2_converted = crypto.createHash('sha1')
.update(datum2.toString('base64'), 'base64')
.digest('hex');
const hash2_direct = crypto.createHash('sha1').update(datum2).digest('hex');
assert.strictEqual(hash2_direct, hash2_converted, 'should hash the same.');
assert.strictEqual(hash2_direct, hash2_converted);
}

Loading…
Cancel
Save