Switch branches/tags
1.1.5 1.2.0 add-codepen-recipe-40 add-collect-node-env-variables cy-3.1.0-for-190 cy-task-recipe cypress-4 file-upload-recipe-43 greenkeeper/chalk-2.3.1 greenkeeper/chalk-2.3.2 greenkeeper/chalk-2.4.0 greenkeeper/chalk-pin-2.3.0 greenkeeper/enzyme-3.3.0 greenkeeper/enzyme-pin-3.2.0 greenkeeper/eslint-4.19.1 greenkeeper/jquery-3.3.1 greenkeeper/jquery-pin-3.3.0 greenkeeper/lodash-4.17.5 greenkeeper/lodash-pin-4.17.4 greenkeeper/nodemon-1.17.3 greenkeeper/nodemon-1.17.5 greenkeeper/pretty-ms-3.2.0 greenkeeper/pretty-ms-pin-3.1.0 greenkeeper/react-dom-16.1.0 greenkeeper/react-dom-16.1.1 greenkeeper/react-dom-16.2.0 greenkeeper/react-dom-pin-16.0.0 greenkeeper/@types/mocha-5.2.1 greenkeeper/webpack-4.6.0 greenkeeper/webpack-4.8.2 greenkeeper/webpack-4.8.3 greenkeeper/webpack-4.9.0 greenkeeper/webpack-4.9.1 greenkeeper/webpack-4.9.2 greenkeeper/webpack-4.10.0 greenkeeper/webpack-4.10.1 greenkeeper/webpack-4.10.2 image-with-ff issue-20 issue-30 issue-35 issue-150 issue-165 kill-background-travis-jobs-156 lint-ts master new-window-stub-recipe parallel-circle-jobs-56 parcel-preprocessor polyfill-fetch-in-test-only preprocessor property-assertion-example renovate/chai-4.x renovate/cypress-browserify-preprocessor-1.x renovate/eslint-plugin-mocha-5.x renovate/execa-0.x renovate/fs-extra-7.x renovate/json-server-0.x renovate/nodemon-1.x renovate/npm-run-all-4.x renovate/stop-only-1.x renovate/stop-only-2.x renovate/ts-loader-4.x renovate/tslint-5.x renovate/typescript-3.x renovate/webpack-4.x snapshot-testing-recipe-66 split-long-spec split-travis-ci-jobs-71 spy-retry stop-server-better-156 testing-redux-store ts-loader-4 update-ts-webpack-example vue-example-39
Nothing to show
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
cypress Split long spec (#172) Jul 23, 2018
README.md Split long spec (#172) Jul 23, 2018
cypress.json Issue 20 (#31) Nov 25, 2017
fruits.json Issue 20 (#31) Nov 25, 2017
index.html Issue 20 (#31) Nov 25, 2017
package.json Issue 20 (#31) Nov 25, 2017
server.js Issue 20 (#31) Nov 25, 2017
styles.css Issue 20 (#31) Nov 25, 2017

README.md

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.