From 34f56e2d711aaff10838167aa4ece77d278cfa09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Sat, 4 Aug 2018 18:39:45 +0200 Subject: [PATCH] test: fix crypto test case PR-URL: https://github.com/nodejs/node/pull/22126 Reviewed-By: Ujjwal Sharma Reviewed-By: Matteo Collina Reviewed-By: Trivikram Kamat Reviewed-By: James M Snell --- test/parallel/test-crypto-cipher-decipher.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/test/parallel/test-crypto-cipher-decipher.js b/test/parallel/test-crypto-cipher-decipher.js index 81c5f32d492839..3c0658762f478b 100644 --- a/test/parallel/test-crypto-cipher-decipher.js +++ b/test/parallel/test-crypto-cipher-decipher.js @@ -112,15 +112,6 @@ testCipher2(Buffer.from('0123456789abcdef')); 'TypedArray, or DataView. Received type object' }); - 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), { @@ -146,6 +137,15 @@ testCipher2(Buffer.from('0123456789abcdef')); 'Received type object' }); + 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), {