https://github.com/alexkrolick/cypress-test
playing around with cypress + react + dom-testing-library
https://github.com/alexkrolick/cypress-test
javascript testing
Last synced: about 1 year ago
JSON representation
playing around with cypress + react + dom-testing-library
- Host: GitHub
- URL: https://github.com/alexkrolick/cypress-test
- Owner: alexkrolick
- Created: 2018-11-11T21:35:01.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-12T05:46:32.000Z (over 7 years ago)
- Last Synced: 2025-04-02T00:11:40.454Z (about 1 year ago)
- Topics: javascript, testing
- Language: JavaScript
- Homepage:
- Size: 145 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# cypress-test
Playing around with Cypress, Jest's `expect`, and `dom-testing-library`
## Progress
- [expect-compat](./cypress/support/expect-compat.js):
- merge Chai/Cypres and Jasmine/Jest assertions onto one `expect`
- add [jest-dom](https://github.com/gnapse/jest-dom) assertions like `toHaveTextContent`, `toBeInTheDocument`
- [index.spec.js](./cypress/integration/index.spec.js):
- use `dom-testing-library` inside Cypress without a plugin
- trigger events with [user-event](https://github.com/Gpx/user-event)


## Weirdness
- Asssertions from Jest don't show up in the result panel or trigger a DOM snapshot for debugging
- Need to use `done` argument (legacy from Mocha) in async tests that have native Promise chains