test: replace equal with strictEqual in crypto
Replace assert.equal with assert.strictEqual in crypto cipher-decipher test PR-URL: https://github.com/nodejs/node/pull/9886 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
318f34543c
commit
a8c2bece2e
@ -27,7 +27,7 @@ function testCipher1(key) {
|
|||||||
var txt = decipher.update(ciph, 'hex', 'utf8');
|
var txt = decipher.update(ciph, 'hex', 'utf8');
|
||||||
txt += decipher.final('utf8');
|
txt += decipher.final('utf8');
|
||||||
|
|
||||||
assert.equal(txt, plaintext, 'encryption and decryption');
|
assert.strictEqual(txt, plaintext, 'encryption and decryption');
|
||||||
|
|
||||||
// streaming cipher interface
|
// streaming cipher interface
|
||||||
// NB: In real life, it's not guaranteed that you can get all of it
|
// NB: In real life, it's not guaranteed that you can get all of it
|
||||||
@ -41,7 +41,7 @@ function testCipher1(key) {
|
|||||||
dStream.end(ciph);
|
dStream.end(ciph);
|
||||||
txt = dStream.read().toString('utf8');
|
txt = dStream.read().toString('utf8');
|
||||||
|
|
||||||
assert.equal(txt, plaintext, 'encryption and decryption with streams');
|
assert.strictEqual(txt, plaintext, 'encryption and decryption with streams');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -63,7 +63,7 @@ function testCipher2(key) {
|
|||||||
var txt = decipher.update(ciph, 'base64', 'utf8');
|
var txt = decipher.update(ciph, 'base64', 'utf8');
|
||||||
txt += decipher.final('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');
|
testCipher1('MySecretKey123');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user