Test-driven development (TDD) works in a tight loop: 🔴 red, then green, then refactor, then repeat.
Refactor the existing shop code to make room for discounts
Write the whole discount() feature, then add tests to confirm it
Write a test that passes immediately, to check the setup works
Write a small test for the new behavior and watch it fail