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), {