Skip to content

Commit f76bb2a

Browse files
julianduqueaddaleax
authored andcommitted
test: refactor test for crypto cipher/decipher iv
Replace assert.equal with assert.strictEqual. PR-URL: #9943 Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent 4cc813d commit f76bb2a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎test/parallel/test-crypto-cipheriv-decipheriv.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function testCipher1(key, iv) {
2222
vartxt=decipher.update(ciph,'hex','utf8');
2323
txt+=decipher.final('utf8');
2424

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

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

39-
assert.equal(txt,plaintext,'streaming cipher iv');
39+
assert.strictEqual(txt,plaintext,'streaming cipher iv');
4040
}
4141

4242

@@ -54,7 +54,7 @@ function testCipher2(key, iv) {
5454
vartxt=decipher.update(ciph,'buffer','utf8');
5555
txt+=decipher.final('utf8');
5656

57-
assert.equal(txt,plaintext,'encryption and decryption with key and iv');
57+
assert.strictEqual(txt,plaintext,'encryption/decryption with key and iv');
5858
}
5959

6060
testCipher1('0123456789abcd0123456789','12345678');

0 commit comments

Comments
 (0)