aboutsummaryrefslogtreecommitdiff
path: root/test/parallel/test-crypto-cipher-decipher.js
diff options
context:
space:
mode:
authorAli Groening <ali.groening@gmail.com>2017-10-06 11:20:11 -0700
committerJoyee Cheung <joyeec9h3@gmail.com>2017-10-14 17:09:52 +0800
commitf4cab35dd88da512ddc2c82dcb6eda8e3db85774 (patch)
treeb0082fdfd79a99de4c8cc13259265cf3c5e46eee /test/parallel/test-crypto-cipher-decipher.js
parentcbbc1e4496bb41e917e496b8ea6fcaabfccaf4eb (diff)
downloadandroid-node-v8-f4cab35dd88da512ddc2c82dcb6eda8e3db85774.tar.gz
android-node-v8-f4cab35dd88da512ddc2c82dcb6eda8e3db85774.tar.bz2
android-node-v8-f4cab35dd88da512ddc2c82dcb6eda8e3db85774.zip
test: remove test messages for assert.strictEqual
Remove test messages for assert.strictEqual, as the default messages are a better option. PR-URL: https://github.com/nodejs/node/pull/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>
Diffstat (limited to 'test/parallel/test-crypto-cipher-decipher.js')
-rw-r--r--test/parallel/test-crypto-cipher-decipher.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/parallel/test-crypto-cipher-decipher.js b/test/parallel/test-crypto-cipher-decipher.js
index 336ab3a07b..c1f1d84b79 100644
--- a/test/parallel/test-crypto-cipher-decipher.js
+++ b/test/parallel/test-crypto-cipher-decipher.js
@@ -25,7 +25,7 @@ function testCipher1(key) {
let txt = decipher.update(ciph, 'hex', 'utf8');
txt += decipher.final('utf8');
- assert.strictEqual(txt, plaintext, 'encryption and decryption');
+ assert.strictEqual(txt, plaintext);
// streaming cipher interface
// NB: In real life, it's not guaranteed that you can get all of it
@@ -39,7 +39,7 @@ function testCipher1(key) {
dStream.end(ciph);
txt = dStream.read().toString('utf8');
- assert.strictEqual(txt, plaintext, 'encryption and decryption with streams');
+ assert.strictEqual(txt, plaintext);
}
@@ -61,7 +61,7 @@ function testCipher2(key) {
let txt = decipher.update(ciph, 'base64', 'utf8');
txt += decipher.final('utf8');
- assert.strictEqual(txt, plaintext, 'encryption and decryption with Base64');
+ assert.strictEqual(txt, plaintext);
}
testCipher1('MySecretKey123');
@@ -125,17 +125,17 @@ testCipher2(Buffer.from('0123456789abcdef'));
let txt;
assert.doesNotThrow(() => txt = decipher.update(ciph, 'base64', 'ucs2'));
assert.doesNotThrow(() => txt += decipher.final('ucs2'));
- assert.strictEqual(txt, plaintext, 'decrypted result in ucs2');
+ assert.strictEqual(txt, plaintext);
decipher = crypto.createDecipher('aes192', key);
assert.doesNotThrow(() => txt = decipher.update(ciph, 'base64', 'ucs-2'));
assert.doesNotThrow(() => txt += decipher.final('ucs-2'));
- assert.strictEqual(txt, plaintext, 'decrypted result in ucs-2');
+ assert.strictEqual(txt, plaintext);
decipher = crypto.createDecipher('aes192', key);
assert.doesNotThrow(() => txt = decipher.update(ciph, 'base64', 'utf-16le'));
assert.doesNotThrow(() => txt += decipher.final('utf-16le'));
- assert.strictEqual(txt, plaintext, 'decrypted result in utf-16le');
+ assert.strictEqual(txt, plaintext);
}
// setAutoPadding/setAuthTag/setAAD should return `this`