diff options
Diffstat (limited to 'test/parallel/test-crypto-hmac.js')
-rw-r--r-- | test/parallel/test-crypto-hmac.js | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/test/parallel/test-crypto-hmac.js b/test/parallel/test-crypto-hmac.js index 21ff3b0b04..2601994ab1 100644 --- a/test/parallel/test-crypto-hmac.js +++ b/test/parallel/test-crypto-hmac.js @@ -408,12 +408,9 @@ const rfc2202_sha1 = [ for (const { key, data, hmac } of rfc2202_sha1) testHmac('sha1', key, data, hmac); -common.expectsError( - () => crypto.createHmac('sha256', 'w00t').digest('ucs2'), - { - code: 'ERR_CRYPTO_HASH_DIGEST_NO_UTF16', - type: Error - }); +assert.strictEqual( + crypto.createHmac('sha256', 'w00t').digest('ucs2'), + crypto.createHmac('sha256', 'w00t').digest().toString('ucs2')); // Check initialized -> uninitialized state transition after calling digest(). { |