Skip to content

Commit

Permalink
test: replace equal with strictEqual in crypto
Browse files Browse the repository at this point in the history
Replace assert.equal with assert.strictEqual in
crypto cipher-decipher test

PR-URL: #9886
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Evan Lucas <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
julianduque authored and MylesBorins committed Dec 21, 2016
1 parent 8fc65e5 commit 8e0a434
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/parallel/test-crypto-cipher-decipher.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function testCipher1(key) {
var txt = decipher.update(ciph, 'hex', 'utf8');
txt += decipher.final('utf8');

assert.equal(txt, plaintext, 'encryption and decryption');
assert.strictEqual(txt, plaintext, 'encryption and decryption');

// streaming cipher interface
// NB: In real life, it's not guaranteed that you can get all of it
Expand All @@ -41,7 +41,7 @@ function testCipher1(key) {
dStream.end(ciph);
txt = dStream.read().toString('utf8');

assert.equal(txt, plaintext, 'encryption and decryption with streams');
assert.strictEqual(txt, plaintext, 'encryption and decryption with streams');
}


Expand All @@ -63,7 +63,7 @@ function testCipher2(key) {
var txt = decipher.update(ciph, 'base64', 'utf8');
txt += decipher.final('utf8');

assert.equal(txt, plaintext, 'encryption and decryption with Base64');
assert.strictEqual(txt, plaintext, 'encryption and decryption with Base64');
}

testCipher1('MySecretKey123');
Expand Down

0 comments on commit 8e0a434

Please sign in to comment.