-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
I found that there is a timing issue where if the generator is called before the http request to get the random numbers completes then NaN is returned. This is causing issues for me when running automated tests because there does not seem to be the extra delay that is needed for actual numbers to be returned.
Below is my sample code that produces the result.
const { rand: Random } = require('true-random/es6');
const generator = new Random();
generator.integers(1, 16, 24).map((r) => Math.trunc(r).toString(16).toUpperCase()).join('')(I am using true-random/es6 because without the /es6 part it has issues running the tests for some reason)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels