Cypress

Overview

What you'll learn

  • What Cypress is and how it helps with testing

  • Basic usage

Cypress is a JavaScript End to End Testing framework.

It builds on Mocha and Chai, which are baked into it.

Installation

  • describe and it come from Mocha

  • expect comes from Chai

Install:

npm install cypress --save-dev

Run:

# Using full path:
./node_modules/.bin/cypress open

# Or with npm bin shortcut:
$(npm bin)/cypress open

Add to package.json scripts:

{
  "scripts": {
    "cypress:open": "cypress open"
  }
}

Run from project root:

npm run cypress:open

Last updated

Was this helpful?