summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTobias Nießen <tniessen@tnie.de>2018-08-04 18:39:45 +0200
committerTobias Nießen <tniessen@tnie.de>2018-08-10 12:40:36 +0200
commit34f56e2d711aaff10838167aa4ece77d278cfa09 (patch)
treef2d03acfd6515ea71917b5f731acfdf3971a73ec /test
parent346f2a7bec5ad60a3e4d7af3b0ca83e63207ede1 (diff)
downloadandroid-node-v8-34f56e2d711aaff10838167aa4ece77d278cfa09.tar.gz
android-node-v8-34f56e2d711aaff10838167aa4ece77d278cfa09.tar.bz2
android-node-v8-34f56e2d711aaff10838167aa4ece77d278cfa09.zip
test: fix crypto test case
PR-URL: https://github.com/nodejs/node/pull/22126 Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/parallel/test-crypto-cipher-decipher.js18
1 files changed, 9 insertions, 9 deletions
diff --git a/test/parallel/test-crypto-cipher-decipher.js b/test/parallel/test-crypto-cipher-decipher.js
index 81c5f32d49..3c0658762f 100644
--- a/test/parallel/test-crypto-cipher-decipher.js
+++ b/test/parallel/test-crypto-cipher-decipher.js
@@ -113,15 +113,6 @@ testCipher2(Buffer.from('0123456789abcdef'));
});
common.expectsError(
- () => crypto.createCipher('aes-256-cbc', 'secret').setAuthTag(null),
- {
- code: 'ERR_INVALID_ARG_TYPE',
- type: TypeError,
- message: 'The "buffer" argument must be one of type Buffer, ' +
- 'TypedArray, or DataView. Received type object'
- });
-
- common.expectsError(
() => crypto.createCipher('aes-256-cbc', 'secret').setAAD(null),
{
code: 'ERR_INVALID_ARG_TYPE',
@@ -147,6 +138,15 @@ testCipher2(Buffer.from('0123456789abcdef'));
});
common.expectsError(
+ () => crypto.createDecipher('aes-256-cbc', 'secret').setAuthTag(null),
+ {
+ code: 'ERR_INVALID_ARG_TYPE',
+ type: TypeError,
+ message: 'The "buffer" argument must be one of type Buffer, ' +
+ 'TypedArray, or DataView. Received type object'
+ });
+
+ common.expectsError(
() => crypto.createDecipher('aes-256-cbc', null),
{
code: 'ERR_INVALID_ARG_TYPE',