Skip to the editor

The subtotal forgets the quantity

State across pages · level 3 of 5 · Terra Supply

Testing with a quantity of one hides every multiplication bug. Choose data that makes a wrong calculation look wrong.

The problem

Add the Trail Runner Backpack ($89) to the cart, raise its quantity to 3, and prove the subtotal is $267.

The trap: with a quantity of 1, a subtotal that ignores quantity looks perfectly correct. Your test data has to make the bug visible.

Done when

  • The cart subtotal multiplies the item price by its quantity.

Bugs we plant

  • Subtotal ignores quantity (charges for one)

We break each one in a copy of the app. Your test has to fail on every copy.

Loading the editor…