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