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