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

provide a way to seed the generator to enable reproducible runs #158

Closed
travi opened this issue Apr 6, 2017 · 1 comment
Closed

provide a way to seed the generator to enable reproducible runs #158

travi opened this issue Apr 6, 2017 · 1 comment

Comments

@travi
Copy link
Owner

travi commented Apr 6, 2017

the randomness makes it really hard to track down an issue when it is not predictable when it will happen

  • somehow print the seed in the test output (at least in a failure case)
  • allow the ability to pass the seed to the generator so that the situation can be reproduced without waiting for it to randomly happen again
  • lint rule to prevent committing a generator with a hardcoded seed
@travi
Copy link
Owner Author

travi commented Apr 7, 2017

chance does support passing a seed, but doesnt seem to have a way to get the seed that was used. this means, a seed would need to always be passed in order to print out the current one for every run, so i'd have to take over the randomness.

http://chancejs.com/#advanced

@travi travi closed this as completed in b549618 Jun 29, 2017
travi added a commit that referenced this issue Jun 29, 2017
the randomness behavior was noticably different from chance's default behavior without this change

for #158
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