From 412772f6d1e5a83c73a4d38aab25d054aea9bd16 Mon Sep 17 00:00:00 2001 From: Leonardo Dino Date: Tue, 31 Oct 2017 12:24:41 -0200 Subject: [PATCH] fix build on node 8 buffer behaviour change caused by: nodejs/node#12012 landed in: https://github.com/nodejs/node/commit/682573c11 --- test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test.js b/test.js index 6ba4170..451ee78 100644 --- a/test.js +++ b/test.js @@ -225,7 +225,7 @@ test('test encryption error handling', function(t){ t.throws(function(){ basicCrypto.decrypt(invalidhex) - }, /Invalid hex/i, 'Invalid hex string') + }, /Invalid hex|Missing HMAC/i, 'Invalid hex string') t.end() }) @@ -274,7 +274,7 @@ test('decryption - reject invalid input', function(t){ t.throws(function(){ var invalidhex = parts[0] basicCrypto.decrypt(invalidhex) - }, /Invalid hex/i, 'Invalid hex string') + }, /Invalid hex|Missing HMAC/i, 'Invalid hex string') t.throws(function(){ basicCrypto.decrypt()