~/talk

Why you should Jest use Cypress for React component testing

Talkat UtahJS Conf 2023 · on Friday, 2023-09-15· [testing, react]
linkedin:tyler-graf
slides:none on file

Demo converts a MidJourney image-list React component and runs it with cy.mount in a real browser, stubs the GET using cy.intercept and a fixtures JSON, asserts five item buttons and clicks one to open an overlay, and uses Cypress Testing Library selectors. Tests show interactive snapshots, allow in‑browser debugging and stepping, and the Dashboard records a video of failures (paid). Claim: browser rendering avoids jsdom/act errors, simplifies mocking network responses, and supports built‑in parallelization.

AI-written summary · about

  1. 0:00Introduction and setup
  2. 1:08Cypress overview and comparison
  3. 3:54Demo setup and first test
  4. 8:18Mocking API calls and viewport
  5. 10:24Interacting with components
  6. 11:07Testing user interactions
  7. 14:01Debugging in Cypress
  8. 16:38Cypress vs Jest debugging
  9. 17:19Cypress dashboard features
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.