Sign in

Trace the refund

exerciseFoundation mode: no AI

A small payments module refunds orders. Support says a refund sometimes leaves the order marked as paid. The tests in this exercise describe the correct behaviour; starter/refund.ts currently fails one of them.

Read the code first. Trace what happens to order.status from refund() to the returned object. Then make the failing test pass without breaking the others.

Loading exercise…

Loading discussion…

Something wrong in this lesson? Open an issue.