# `test.fake_exhausted`

Test called a faked operation more times than its fakes script.

Area 13, [Testing](../topics/testing.md); not declinable; the next step is usually the agent's.

A test called a faked provider operation more times than its `fakes:`
scripts answers. The call past the script was
answered with the generated default, so whatever the test did next
followed from a call it didn't expect; the report names the operation,
at the line of its first scripted answer:













```jadpo
use app { couriers }
use shipping/failures { SlotGone }

test "a taken slot is the app's own failure" {
    fakes: {
        couriers.bookings.create: [slot_taken]
    }
    assert book("N1 9GU") fails SlotGone
    assert book("SW1A 1AA") fails SlotGone
}
```

```text
FAIL  a taken slot is the app's own failure
 --> domains/shipping/actions/book.test.jadpo:6

  fake: `couriers.bookings.create` was called twice, and its `fakes:` scripts 1 answer
  reason: A scripted operation answers each call with the next scripted answer, so a call past the last means the code calls it more often than the test says; that call was answered with the generated default.
  next: Script an answer for every call of `couriers.bookings.create`, or find why the code calls it again (agent)

  rule: test.fake_exhausted
  rerun: jadpo test domains/shipping/actions/book.test.jadpo:6 --seed 1

test failed: 1 failed, 1 action test
```
