Projects / Ways of working / Beginner

🧪 Fix a broken shipping-fee calculation by writing the tests first

☆ Read later

What you end up with

Seven tests that pin down the boundaries, and an implementation that passes all of them. The next person to touch it finds that the table of tests works as the spec.

🔒

Create a free account to read this project

Sign up for a free membership to read every free project. Already have an account? Please sign in.

Report a problem with this project

Log in to send a report.

What to build next

Intermediate 🎲

Measure how often a flaky test fails, then fix it

You fix tests that pass locally but fail now and then in CI. You reproduce the three usual causes (the clock, randomness, state left over between tests), put a number on how often each fails, then rework the code to take the outside world as arguments, and confirm it survives 200 shuffled runs.

← Back to all projects