Testkit / examples

From a user situation to an inspectable failure.

Start with the behaviour that matters. Reveal the test shape and technical record only when you need them.

Product situation

A customer refreshes while a payment is retrying.

The customer should see one completed order, even if the network interrupts their first attempt.

1. The familiar test shape
TypeScript
test("interrupted checkout completes once", async () => {
  await customer.resumeCheckout()
  await expect(order).toBeCompletedOnce()
  await expect(payment).toBeCapturedOnce()
})
2. Run result

Failure reproduced: the retry issued a second provider request after the original capture succeeded.

3. Durable record

Testkit links the user situation, environment, replay, trace, and failure identity so the fix can be verified later.