From 185342448a8baa1293ad3e59a335a24f1b54794f Mon Sep 17 00:00:00 2001 From: Vitaliy Pavlenko Date: Sun, 1 Jan 2023 19:18:19 +0200 Subject: [PATCH] updated tests with error check --- test/parallel/test-crypto-encoding-validation-error.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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' } ); }