Skip to content

Commit 57ae105

Browse files
tisAliGMylesBorins
authored andcommitted
test: remove test messages for assert.strictEqual
Remove test messages for assert.strictEqual, as the default messages are a better option. PR-URL: #15995 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
1 parent 87b9b7c commit 57ae105

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

+6-6
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function testCipher1(key) {
2525
let txt = decipher.update(ciph, 'hex', 'utf8');
2626
txt += decipher.final('utf8');
2727

28-
assert.strictEqual(txt, plaintext, 'encryption and decryption');
28+
assert.strictEqual(txt, plaintext);
2929

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

42-
assert.strictEqual(txt, plaintext, 'encryption and decryption with streams');
42+
assert.strictEqual(txt, plaintext);
4343
}
4444

4545

@@ -61,7 +61,7 @@ function testCipher2(key) {
6161
let txt = decipher.update(ciph, 'base64', 'utf8');
6262
txt += decipher.final('utf8');
6363

64-
assert.strictEqual(txt, plaintext, 'encryption and decryption with Base64');
64+
assert.strictEqual(txt, plaintext);
6565
}
6666

6767
testCipher1('MySecretKey123');
@@ -125,17 +125,17 @@ testCipher2(Buffer.from('0123456789abcdef'));
125125
let txt;
126126
assert.doesNotThrow(() => txt = decipher.update(ciph, 'base64', 'ucs2'));
127127
assert.doesNotThrow(() => txt += decipher.final('ucs2'));
128-
assert.strictEqual(txt, plaintext, 'decrypted result in ucs2');
128+
assert.strictEqual(txt, plaintext);
129129

130130
decipher = crypto.createDecipher('aes192', key);
131131
assert.doesNotThrow(() => txt = decipher.update(ciph, 'base64', 'ucs-2'));
132132
assert.doesNotThrow(() => txt += decipher.final('ucs-2'));
133-
assert.strictEqual(txt, plaintext, 'decrypted result in ucs-2');
133+
assert.strictEqual(txt, plaintext);
134134

135135
decipher = crypto.createDecipher('aes192', key);
136136
assert.doesNotThrow(() => txt = decipher.update(ciph, 'base64', 'utf-16le'));
137137
assert.doesNotThrow(() => txt += decipher.final('utf-16le'));
138-
assert.strictEqual(txt, plaintext, 'decrypted result in utf-16le');
138+
assert.strictEqual(txt, plaintext);
139139
}
140140

141141
// setAutoPadding/setAuthTag/setAAD should return `this`

0 commit comments

Comments
 (0)