Skip to content

Latest commit

 

History

History
 
 

stubbing-spying__window-fetch

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Stubbing window.fetch

  • Use cy.spy() to verify the behavior of a function.
  • Use cy.stub() to verify and control the behavior of a function.
  • Use cy.clock() and cy.tick() to control time.
  • Stub window.fetch to control server responses.
  • Replace window.fetch with a polyfill that uses XHR and is loaded only for tests

See individual spec files in cypress/integration folder.