Playing around with Cypress, Jest's expect
, and dom-testing-library
- expect-compat:
- merge Chai/Cypres and Jasmine/Jest assertions onto one
expect
- add jest-dom assertions like
toHaveTextContent
,toBeInTheDocument
- merge Chai/Cypres and Jasmine/Jest assertions onto one
- index.spec.js:
- use
dom-testing-library
inside Cypress without a plugin - trigger events with user-event
- use
- 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