Skip to content

Commit

Permalink
updated tests with error check
Browse files Browse the repository at this point in the history
  • Loading branch information
vitpavlenko committed Jan 1, 2023
1 parent fd00e53 commit 1853424
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/parallel/test-crypto-encoding-validation-error.js
Expand Up @@ -17,7 +17,7 @@ const createCipher = () => {

assert.throws(
() => cipher.update('test', 'bad1', 'hex'),
{ message: /^Unknown encoding bad1$/ }
{ message: /^Unknown encoding bad1$/, code: 'ERR_CRYPTO_UNKNOWN_ENCODING' }
);
}

Expand All @@ -27,7 +27,7 @@ const createCipher = () => {

assert.throws(
() => cipher.final('bad2'),
{ message: /^Unknown encoding bad2$/ }
{ message: /^Unknown encoding bad2$/, code: 'ERR_CRYPTO_UNKNOWN_ENCODING' }
);
}

Expand All @@ -36,6 +36,6 @@ const createCipher = () => {

assert.throws(
() => cipher.update('test', 'utf-8', 'bad3'),
{ message: /^Unknown encoding bad3$/ }
{ message: /^Unknown encoding bad3$/, code: 'ERR_CRYPTO_UNKNOWN_ENCODING' }
);
}

0 comments on commit 1853424

Please sign in to comment.