Skip to content

Commit

Permalink
test: fix crypto test case
Browse files Browse the repository at this point in the history
PR-URL: #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>
  • Loading branch information
tniessen committed Aug 10, 2018
1 parent 346f2a7 commit 34f56e2
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions test/parallel/test-crypto-cipher-decipher.js
Original file line number Diff line number Diff line change
Expand Up @@ -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),
{
Expand All @@ -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),
{
Expand Down

0 comments on commit 34f56e2

Please sign in to comment.