I've created a small reproducible test case here: https://github.com/opyate/jest-seedrandom-testcase
When I use seedrandom, I get predictable randomness, as proven by the test (when running it again and again with npx jest
).
However, when I add inconsequential code to the test, it fails.
Can anyone shed some light as to why this might happen? And more importantly, how do I configure jest
so the test doesn't fail when it changes?
from Jest test with seedrandom is unpredictable when source code changes, and test fails
No comments:
Post a Comment