The Wayback Machine - https://web.archive.org/web/20250407172928/https://github.com/nodejs/node/commit/5446b3c6a0
Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Commit 5446b3c

Browse filesBrowse files
julianduqueaddaleax
authored andcommitted
test: replace equal with strictEqual in crypto
Replace assert.equal with assert.strictEqual in crypto cipher-decipher test PR-URL: #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>
1 parent 0c66f68 commit 5446b3c
Copy full SHA for 5446b3c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎test/parallel/test-crypto-cipher-decipher.js

Copy file name to clipboardexpand all lines: test/parallel/test-crypto-cipher-decipher.js
+3-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function testCipher1(key) {
2727
var txt = decipher.update(ciph, 'hex', 'utf8');
2828
txt += decipher.final('utf8');
2929

30-
assert.equal(txt, plaintext, 'encryption and decryption');
30+
assert.strictEqual(txt, plaintext, 'encryption and decryption');
3131

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

44-
assert.equal(txt, plaintext, 'encryption and decryption with streams');
44+
assert.strictEqual(txt, plaintext, 'encryption and decryption with streams');
4545
}
4646

4747

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

66-
assert.equal(txt, plaintext, 'encryption and decryption with Base64');
66+
assert.strictEqual(txt, plaintext, 'encryption and decryption with Base64');
6767
}
6868

6969
testCipher1('MySecretKey123');

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.