Test-Driven Development with Vue.js
summary
Builds a file‑upload Vue component with Vue Test Utils and Jest following red/green/refactor cycles, starts by making a failing spec that expects “uploading 2 files” for two inputs (3.2MB and 4.3MB → 7.5 MB), implements a progress bar with a 50% width, and drives size formatting tests that switch to kilobytes for <1000 bytes (0.75 KB) and gigabytes for billions. Extracts a utility to compute unit and power, fixes QA-reported edge cases, and all examples are implemented until tests pass.
AI-written summary · about
chapters (7)
- 0:00Start
- 0:46Testing is one of the pillars of writing robust software.
- 3:39Test-Driven Development Popularized by Kent Beck
- 14:44Fixing issues with TDD
- 20:35TDD helps you write robust tests, not too many and not too few.
- 20:52TDD encourages refactors, which leads to better software design.
- 21:35Fixing bugs is far more costly than preventing them.
related talks
26mUnit testing Vue components Why test, what to test, and how to test Vue components
21mTesting Vue Apps
50mTest Driven Development in Vue with Cypress
23mSeven ways to make your Vue component tests better
39m7 ways to make your Vue unit tests better
31mNext Level Jest Testing
24mWriting Good Tests for Vue Applications
57mScaling the Testing Pyramid in JavaScript
