How not to test
summary
Explains why many frontend unit tests are useless because they assert implementation details or tautologies rather than observable behavior. Gives three anti-patterns—testing static values, creating “test twins” that mirror implementation, and overly complex full DOM UI tests—and recommends testing observable outcomes (e.g., presence of a Twitter link), using component APIs or lightweight integration tests, extracting debounce into a synchronous wrapper, and focusing on meaningful tests rather than coverage metrics (one concrete fix reduced a 4-day refactor to 1 day).
AI-written summary · about
chapters (4)
related talks
39mTen things you heard about testing that might be wrong
17mThe pragmatic front-end tester
44mTesting the untestable - patterns and use cases analysis
37mClean Test Code
19mModern Testing Strategies for Reactive Applications
41mTesting that the code does what the code does
46mBetter code through boring(er) tests
57mAdvanced Testing Techniques: Tips from the trenches
