summaryrefslogtreecommitdiff
path: root/test/parallel/test-crypto-hash.js
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2016-04-19 15:37:45 -0700
committerRich Trott <rtrott@gmail.com>2016-04-22 14:38:09 -0700
commita7335bd1f048f6592f609eec0c87c007e98d754c (patch)
tree1f888003dea7c3fb67366ac1a94f418eb7acb168 /test/parallel/test-crypto-hash.js
parent5eb4ec090d70a848e2ae98bd526634bf9d1bf08c (diff)
downloadnode-new-a7335bd1f048f6592f609eec0c87c007e98d754c.tar.gz
test,benchmark: use deepStrictEqual()
In preparation for a lint rule that will enforce assert.deepStrictEqual() over assert.deepEqual(), change tests and benchmarks accordingly. For tests and benchmarks that are testing or benchmarking assert.deepEqual() itself, apply a comment to ignore the upcoming rule. PR-URL: https://github.com/nodejs/node/pull/6213 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'test/parallel/test-crypto-hash.js')
-rw-r--r--test/parallel/test-crypto-hash.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/test/parallel/test-crypto-hash.js b/test/parallel/test-crypto-hash.js
index b5fc7e881c..cedb233d00 100644
--- a/test/parallel/test-crypto-hash.js
+++ b/test/parallel/test-crypto-hash.js
@@ -45,7 +45,7 @@ if (!common.hasFipsCrypto) {
assert.equal(a1, '8308651804facb7b9af8ffc53a33a22d6a1c8ac2', 'Test SHA1');
assert.equal(a2, '2bX1jws4GYKTlxhloUB09Z66PoJZW+y+hq5R8dnx9l4=',
'Test SHA256 as base64');
-assert.deepEqual(
+assert.deepStrictEqual(
a3,
Buffer.from(
'\u00c1(4\u00f1\u0003\u001fd\u0097!O\'\u00d4C/&Qz\u00d4' +
@@ -55,13 +55,15 @@ assert.deepEqual(
'\u00c2\u0006\u00da0\u00a1\u00879(G\u00ed\'',
'binary'),
'Test SHA512 as assumed buffer');
-assert.deepEqual(a4,
- Buffer.from('8308651804facb7b9af8ffc53a33a22d6a1c8ac2', 'hex'),
- 'Test SHA1');
+assert.deepStrictEqual(
+ a4,
+ Buffer.from('8308651804facb7b9af8ffc53a33a22d6a1c8ac2', 'hex'),
+ 'Test SHA1'
+);
// stream interface should produce the same result.
-assert.deepEqual(a5, a3, 'stream interface is consistent');
-assert.deepEqual(a6, a3, 'stream interface is consistent');
+assert.deepStrictEqual(a5, a3, 'stream interface is consistent');
+assert.deepStrictEqual(a6, a3, 'stream interface is consistent');
assert.notEqual(a7, undefined, 'no data should return data');
assert.notEqual(a8, undefined, 'empty string should generate data');