From RSpec to Jest: JavaScript testing for Rails devs
summary
A practical path from RSpec habits into JavaScript testing, focusing on Jest and concrete techniques: setting test data for front-end code, mock HTTP requests and asserting DOM state with selector-based checks. Covers common gotchas around async waits and test isolation, compares how RSpec patterns map to Jest assertions and mocks, and supplies actionable setup steps and tips so Rails codebases get JavaScript tests that actually run and catch regressions.
AI-written summary · about
chapters (4)
- 0:00Introduction to testing
- 10:00Why switch from RSpec
- 20:00Key differences in Jest
- 30:00Next steps and resources
related talks
18mStart using Jasmine. Write better JavaScript. Profit.
41mJavascript TDD for Rubyists
29mTest Like It's 2017
31mQuick and easy browser testing using RSpec and Rails 5.1
37mFront-end Testing for Skeptics
01h 02mWriting better tests for your JavaScript app
42mSurviving the JS Testing Tools Jungle
49mFront End Testing Frontier
