Skip to content

Latest commit

 

History

History
 
 

stubbing-spying__functions

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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