Not able to get Stub of Auth Api to work #18815
Unanswered
DiegoMcDipster
asked this question in
Questions and Help
Replies: 1 comment
-
The Sinon website states: Sinon is a stubbing library, not a module interception library. So seeing that:
That comment from the Sinon website tells me that I can't stub the Auth.signIn(...) because Sinon is not a module interception library. But, please correct me if I've misunderstood that. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a login screen. Two fields: email & password
And a button: Sign In
Clicking on the button calls:
For my unit testing of the login form i want to stub the 'Auth.signIn'. So, to make sure an incorrect password is handled correctly I do:
However, the stub is not called and the request is sent to AWS.
I'm new to cypress and stubbing. So, i'm pretty sure it's a noob mistake i'm making. So , if you can see what I'm doing wrong and can advise me... that would be great!
Beta Was this translation helpful? Give feedback.
All reactions