From RSpec to Jest: JavaScript testing for Rails devs
summary
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
related talks
41mJavascript TDD for Rubyists
18mStart using Jasmine. Write better JavaScript. Profit.
29mTest Like It's 2017
01h 02mWriting better tests for your JavaScript app
31mQuick and easy browser testing using RSpec and Rails 5.1
39mTesting, Testing, 1, 2, NaN
16mJest Testing Library with Ariane Jurado de Bilbao
49mFront End Testing Frontier
