Skip to content

Latest commit

 

History

History
16 lines (11 loc) · 635 Bytes

File metadata and controls

16 lines (11 loc) · 635 Bytes

stubbing-spying__functions

Shows how to control dependencies during tests using cy.spy and cy.stub

Shows how to load application code directly from the spec code and shows how to:

  • use cy.spy() to assert that expected calls were made
  • use cy.stub() to replace actual methods calls with synthetic responses
  • Handle promises returned by stubbed functions.
  • Handle callbacks in stubbed functions.

See