Skip to content

Commit

Permalink
test: refactor test for crypto cipher/decipher iv
Browse files Browse the repository at this point in the history
Replace assert.equal with assert.strictEqual.

PR-URL: #9943
Reviewed-By: Rich Trott <[email protected]>
  • Loading branch information
julianduque authored and MylesBorins committed Dec 20, 2016
1 parent a486f6b commit 6ecc4ff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/parallel/test-crypto-cipheriv-decipheriv.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function testCipher1(key, iv) {
var txt = decipher.update(ciph, 'hex', 'utf8');
txt += decipher.final('utf8');

assert.equal(txt, plaintext, 'encryption and decryption with key and iv');
assert.strictEqual(txt, plaintext, 'encryption/decryption with key and iv');

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

assert.equal(txt, plaintext, 'streaming cipher iv');
assert.strictEqual(txt, plaintext, 'streaming cipher iv');
}


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

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

testCipher1('0123456789abcd0123456789', '12345678');
Expand Down

0 comments on commit 6ecc4ff

Please sign in to comment.