Testing Javascript: Building JavaScript applications you won't hate
summary
Concrete takeaways: use static analysis (ESLint, TypeScript) to catch errors cheaply, write fast unit tests with Jest and isolate rendering from state, prefer Redux-like stores to reduce component interaction tests, use snapshots sparingly, run mutation testing with Stryker locally to find weak tests, and reserve Cypress end-to-end tests for a few core workflows. 100% snapshot coverage is deceptive and run mutation tests locally not in CI — contract testing (Pact-like) protects front end/back end contracts.
AI-written summary · about
chapters (16)
- 0:00Intro
- 0:31TESTING JAVASCRIPT BUILDING JAVASCRIPT APPLICATIONS YOU WON'T HATE
- 1:53WHY DO WE TEST?
- 2:12REFACTORING
- 3:29WHAT DO WE TEST?
- 4:19INTEGRATION TESTS ARE A SCAM
- 4:48TESTING TOOLKIT
- 5:10STATIC ANALYSIS ESLINT & TYPESCRIPT
- 6:20TESTS ARE EXAMPLES CORRECTNESS IS HARD TO PROVE FROM EXAMPLES
- 6:37TYPES DEFINE CATEGORIES CATEGORIES CANNOT PROVE CORRECTNESS
- 7:20UNIT TESTING JEST
- 8:03INTEGRATION TESTING JEST
- 8:21VUEX / REDUX
- 12:09MUTATION TESTING STRYKER
- 14:58E2E TESTING WITH CYPRESS.IO
- 16:35CONTRACT TESTING PACTIO
related talks
01h 02mWriting better tests for your JavaScript app
26mModern Testing Practices in Frontend Applications
26mTip Top Testing in JavaScript
45mWriting Tests That Don't Suck: TDD in JavaScript
39mTesting, Testing, 1, 2, NaN
58mImproving the Quality of JavaScript Code
32mEstablishing testing patterns with software design principles
42mSurviving the JS Testing Tools Jungle
