Three bugs with passing tests, and what each test actually checked
The ticket says 10% off orders of more than 10 units. The pull request says this: // Ticket: "10% off orders of more than 10 units." export function lineTotalCents ( unitCents , qty ) { const rate = qty >= 10 ? 0.9 : 1 ; return Math . round ( unitCents * qty * rate ); } And it ships with this test:…
Read the full story at DEV Community — AI ↗
Timeline · 1 report
- 2026-11-06 09:24 · DEV Community — AI
Three bugs with passing tests, and what each test actually checked