Skip to content

Commit

Permalink
docs: update README for @cypress/react (add commands to run tests) (#…
Browse files Browse the repository at this point in the history
…22477)

Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
  • Loading branch information
3 people authored Jun 29, 2022
1 parent 040b054 commit 55aaf76
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions npm/react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,20 @@ Mount React components in the open source [Cypress.io](https://www.cypress.io/)
npm install --save-dev @cypress/react
```

## Run

Open cypress test runner
```
npx cypress open --component
```

If you need to run test in CI
```
npx cypress run --component
```

For more information, please check the official docs for [running Cypress](https://on.cypress.io/guides/getting-started/opening-the-app#Quick-Configuration) and for [component testing](https://on.cypress.io/guides/component-testing/writing-your-first-component-test).

## API

- `mount` is the most important function, allows to mount a given React component as a mini web application and interact with it using Cypress commands
Expand Down

0 comments on commit 55aaf76

Please sign in to comment.