~/talk

From RSpec to Jest: JavaScript testing for Rails devs

Talkat RailsConf 2024 · 2024-05-07..05-09· [javascript, testing, ruby-on-rails]
slides:none on file

Compares RSpec habits with Jest and shows concrete Jest recipes for Rails apps: configuring Jest, writing unit tests for plain modules and DOM-interacting code, handling async timing and isolated state, and common gotchas with mocks and async. Demonstrates how to mock HTTP requests (fetch/axios style) and assert DOM elements after events, plus tips for test data setup, when to prefer unit vs integration tests, and small migration steps that have worked reliably for teams.

AI-written summary · about

~/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.