- Run
npm i cypress
- Check package.json for:
"scripts": {
"cypress:open": "cypress open"
"cy:run:chrome": "cypress run --browser chrome",
"cy:run:firefox": "cypress run --browser firefox",
"cy:run:edge": "cypress run --browser edge"
}
- Run
npm run cypress:open
- Open code and in project directory terminal run
npx cypress open
- The CY application should open
- Double click the JS test file you want to run and a new testing window should open and run the tests described.
- The tests can be completed in any Chromium Family browser that is installed on your local machine (Chrome, Firefox, Edge, Electron... see full list here)
- To stop the tests and close the chrome window, return the the CY app and select the red STOP button in the upper right corner, and run
^C
in terminal (ctl + C).