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>
This commit is contained in:
parent
346f2a7bec
commit
34f56e2d71
@ -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),
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user