diff --git a/test/parallel/test-crypto-encoding-validation-error.js b/test/parallel/test-crypto-encoding-validation-error.js index e71c7b1c643175..676b89c7b63aa2 100644 --- a/test/parallel/test-crypto-encoding-validation-error.js +++ b/test/parallel/test-crypto-encoding-validation-error.js @@ -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' } ); } @@ -27,7 +27,7 @@ const createCipher = () => { assert.throws( () => cipher.final('bad2'), - { message: /^Unknown encoding bad2$/ } + { message: /^Unknown encoding bad2$/, code: 'ERR_CRYPTO_UNKNOWN_ENCODING' } ); } @@ -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' } ); }