Cypress · Junior · Question 55 of 75
What does cy.stub() create?
- 1A placeholder test that always passes
- 2A fake function you can control and inspect
- 3A copy of the page for offline use
Show the answer
Correct answer: A fake function you can control and inspect
Explanation
Stubs replace methods, for example window.open, and record calls for assertions.