Skip to content
This repository was archived by the owner on Mar 5, 2022. It is now read-only.

Commit 33a5353

Browse files
committed
add link to react animations example
1 parent 1ee7668 commit 33a5353

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ describe('HelloState component', () => {
5151
// mounted component can be selected via its name, function, or JSX
5252
// e.g. '@HelloState', HelloState, or <HelloState />
5353
cy.get(HelloState).invoke('setState', { name: 'React' })
54-
cy.get(HelloState).its('state').should('deep.equal', { name: 'React' })
54+
cy.get(HelloState)
55+
.its('state')
56+
.should('deep.equal', { name: 'React' })
5557
// check if GUI has rerendered
5658
cy.contains('Hello React!')
5759
})
@@ -98,7 +100,7 @@ import './styles.css'
98100
You can read the CSS file and pass it as `style` option yourself
99101

100102
```js
101-
cy.readFile('cypress/integration/Button.css').then((style) => {
103+
cy.readFile('cypress/integration/Button.css').then(style => {
102104
cy.mount(<Button name="Orange" orange />, { style })
103105
})
104106
```
@@ -172,7 +174,7 @@ If you already have a plugins file, you can use a file preprocessor that points
172174
```js
173175
// your project's Cypress plugin file
174176
const craFilePreprocessor = require('cypress-react-unit-test/plugins/cra-v3/file-preprocessor')
175-
module.exports = (on) => {
177+
module.exports = on => {
176178
on('file:preprocessor', craFilePreprocessor())
177179
}
178180
```
@@ -197,6 +199,9 @@ All components are in [src](src) folder. All tests are in [cypress/integration](
197199
- [bahmutov/calculator](https://github.com/bahmutov/calculator) tests multiple components: calculator App, Button, Display.
198200
- [bahmutov/react-todo-with-hooks](https://github.com/bahmutov/react-todo-with-hooks) branch `added-tests`
199201
- [bahmutov/test-redux-examples](https://github.com/bahmutov/test-redux-examples) branch `mount2`
202+
- [bahmutov/test-react-hooks-animations](https://github.com/bahmutov/test-react-hooks-animations) react hooks with spring animations test
203+
204+
To find more examples, see GitHub topic [cypress-react-unit-test-example](https://github.com/topics/cypress-react-unit-test-example)
200205

201206
## Development
202207

0 commit comments

Comments
 (0)