fix test for zero length random string
This commit is contained in:
parent
59476a8087
commit
e470b68ea5
@ -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) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user