diff --git a/test/index.js b/test/index.js index e817d12..e1c4753 100644 --- a/test/index.js +++ b/test/index.js @@ -23,7 +23,10 @@ test ('random_hex with default length', (t) => { }); test ('random_hex should refuse lenght smaller 1', (t) => { - t.throws (() => (crypto.random_hex (0))); + const error = t.throws ( + () => (crypto.random_hex (0)) + ); + t.is(error.message, 'invalid length'); }); test ('random_string', (t) => {