Stub Math Random #29692
Unanswered
Tsourdox
asked this question in
Component Testing
Stub Math Random
#29692
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
How can I stub the math random function to predictably assert an outcome?
cy.stub(Math, "random").returns(0.8);
This doesn't seem to work.
Beta Was this translation helpful? Give feedback.
All reactions