ai / nanoid

A tiny (124 bytes), secure, URL-friendly, unique string ID generator for JavaScript
https://zelark.github.io/nano-id-cc/
MIT License
24.62k stars 790 forks source link

Add test that checks if regeneration of random values is triggered #285

Closed TheSeally closed 3 years ago

TheSeally commented 3 years ago

Fix #283

Using crypto.randomFill in test cause that result of customAlphabet algorithm execution become unpredictable Mock crypto.randomFill implementation for checking algorithm correctness (regeneration of random values)

ai commented 3 years ago

Thanks. I marked task as solved.