Using TDD to Tame the Big Ball o' Mud
summary
Wraps legacy jQuery into a code jail component, add unit and acceptance tests, and follow a concrete five‑step refactor: extract a computed‑property model that pulls GIF URLs, convert to Ember Components, wire data through IC Ajax into Ember Data (about 20 minutes for the conversion), replace DOM mutation with state bound class names and CSS animations, delete the old insertion/delete logic, and confirm tests pass so the feature becomes tested and extensible.
AI-written summary · about
chapters (22)
- 0:00Start
- 6:21Feature request
- 10:13Now what?
- 12:285 steps
- 14:05The Template
- 14:18The Sprinkling
- 14:35First test
- 14:58Hand wave alert
- 16:16AJAX tests
- 16:34More tests
- 17:22Identify Models
- 17:45Unit tests!
- 18:07Extract to model
- 18:26Add Handlebars
- 19:23Identify States
- 20:25Change states
- 20:424. Break it up
- 20:53What's left?
- 22:002nd Component
- 22:152nd Template
- 22:272nd Sprinkle
- 23:10CSS Animation
related talks
16mTest as if you're in someone else's shoes
36mUsing Tests as a Tool to Wrangle Legacy Projects
45mWriting Tests That Don't Suck: TDD in JavaScript
26mAutomated Visual Testing in Ember
37mThe road to Ember-Data 1.0
28mThe Front-end TDD challenge
45mTesting Big in JavaScript
49mAngular Testing In TDD - Writing a Feature Guided By a Responsible Maniac
