Making JavaScript Tests Fast, Easy, and Friendly
summary
Advocates building test infra up front, automating runs from the command line and wiring CI into GitHub and Slack, and using Mocha + Chai for readable assertions with Sinon.js to fake XHR and timers so suites run under 30 seconds (aim 5s) — example: replace setTimeout with fake timers and call clock.tick to simulate 5 minutes instantly. Provide hello world test skeletons and onboarding docs, measure slow tests (51ms warning, 300ms red, 2001ms timeout) and prefer fakes over network waits.
AI-written summary · about
chapters (8)
- 0:00Introduction to testing
- 2:28Why tests feel painful
- 4:36Building test infrastructure
- 10:11Lowering barriers to entry
- 12:36Making tests blazingly fast
- 19:20Cultural shift for testing
- 23:52Bringing it all together
- 25:18Q&A and closing
related talks
45mAutomated Testing JavaScript
54mJavaScript Tests in Node, the Browser, and CI
42mSurviving the JS Testing Tools Jungle
37mTesting in the Node.js World
45mWriting Tests That Don't Suck: TDD in JavaScript
01h 02mWriting better tests for your JavaScript app
27mAutomated Testing for the Modern Web
45mTrojan War: SinonJS
