An open API service indexing awesome lists of open source software.

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

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)

screen shot 2018-11-11 at 8 21 25 pm

screen shot 2018-11-11 at 8 30 59 pm

## 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