testcheck-js
testcheck-js copied to clipboard
Is gen.any supposed to generate any kind of values or only arrays or objects?
Hi,
The documentation for gen.any
says:
Generates any JS value, including Arrays and Objects (possibly nested).
I ran this code a couple of times (± 10 times) and never had any single strings, numbers or booleans:
sample(gen.any, 100).filter(x => typeof x !== 'object');
I know the values in the list are randomly generated but I should have received one non-array non-object value at least once. (Or I might just be extremely unlucky. )
Is gen.any
supposed to produce only arrays or objects? In which case I'd recommend updating the documentation. Otherwise do you think this may be a bug?
I am using testcheck 1.0.0-rc.2
Thank you.
👋 @leebyron
@leebyron Any thoughts?
@leebyron Are you still maintaining this repo? :)