Writing Tests That Don't Suck: TDD in JavaScript
summary
Claims that most JS suites are slow and brittle and then shows concrete fixes: set up jest + babel-preset-env and ES modules, run TDD with the red → green → refactor cycle, and use a continuous runner so WallabyJS gives milliseconds feedback. Demonstrates readable tests: AAA structure, test data builders, isolate external systems with mocks sparingly, favor fast in-memory outside‑in integration tests, and follow two rules—test the what not the how and assert capabilities, not specific test data.
AI-written summary · about
chapters (23)
- 0:00Introduction and speaker welcome
- 1:35Personal journey with testing
- 3:51Why testing matters
- 4:58Unit testing basics
- 6:57Testing frameworks in JavaScript
- 8:24Testing pyramid and techniques
- 10:20Setting up JavaScript tests from scratch
- 15:50What is TDD
- 17:44TDD workflow explained
- 20:02Continuous test runners
- 21:34Intentionality in code and tests
- 23:43Organizing test code
- 25:12Improving test readability
- 27:25Avoiding test noise
- 29:17Keeping tests up to date
- 30:32Test data builders
- 31:21Isolating external systems
- 32:52Asserting single concepts
- 34:41Two big rules of testing
- 36:31Testing capabilities over data
- 38:43Integration tests and developer tests
- 41:43Outside-in testing workflow
- 43:15Q&A on contract testing
related talks
42mTest-Driven Development in Javascript
29mTest-Driven Development with Jest
42mSurviving the JS Testing Tools Jungle
43mThe Little Shop of TDD Horrors
01h 02mWriting better tests for your JavaScript app
25mMaking JavaScript Tests Fast, Easy, and Friendly
01h 06mBeyond Test Driven Development
26mTip Top Testing in JavaScript
