Skip to content

Commit f0ce1a0

Browse files
committed
add scripts for running the cypress tests. update the readme accordingly
1 parent 9f917eb commit f0ce1a0

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,21 +125,22 @@ This project uses both Cypress and Jest for testing.
125125

126126
To run all jest tests for files you have changed, run
127127
```
128-
yarn test
128+
yarn jest
129129
```
130130

131131
or if you want to run tests on changes, in a constant loop
132132

133133
```
134-
yarn test-watch
134+
yarn jest-watch
135135
```
136136

137137
and press `a`
138138

139139
### Cypress
140140
Cypress is an desktop application that runs on your computer. Cypress is already installed on this project, but your machine will need to meet certain [system requirements](https://docs.cypress.io/guides/getting-started/installing-cypress#System-requirements) to run the Cypress application.
141141

142-
If you meet the requirements in the Cypress docs, you can run the `yarn run cypress open` command to start Cypress. from the Cypress desktop app, you will be able to create and run tests.
142+
If you meet the requirements in the Cypress docs, you can run either of the cypress scripts in package.json; one runs in the cli and the other in a browser window. From the Cypress desktop app, you will be able to create and run tests.
143+
143144

144145
There are 2 types of Cypress tests, e2e & component.
145146
- e2e: tests entire flows of the application

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@
1010
"build": "next build",
1111
"start": "next start",
1212
"lint": "next lint --dir pages --dir utils",
13-
"test": "jest",
14-
"test-watch": "jest --watch",
13+
"cypress": "cypress run",
14+
"cypress-gui": "cypress open",
15+
"jest": "jest",
16+
"jest-watch": "jest --watch",
1517
"release": "release-it"
1618
},
1719
"dependencies": {

0 commit comments

Comments
 (0)