Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is gen.any supposed to generate any kind of values or only arrays or objects? #95

Open
customcommander opened this issue Aug 23, 2018 · 3 comments

Comments

@customcommander
Copy link

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.

@customcommander
Copy link
Author

👋 @leebyron

@customcommander
Copy link
Author

@leebyron Any thoughts?

@customcommander
Copy link
Author

@leebyron Are you still maintaining this repo? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant