← All showcases
test-name anchorsTesting
testingtraceability

What this test actually proves

Test-name anchors bind intent to the case. The test file points back.

The assertion string is not the requirement. Link them.

auth/expiry.rq

session_expiry {
    expired tokens must reject requests
    refresh is not attempted for an expired access token
    proven by ["./auth.test.ts:rejects expired access token"]
    @status verified
}

auth.test.ts

// rq:["./expiry.rq".session_expiry]
test("rejects expired access token", async () => {
  const res = await request(app)
    .get("/me")
    .set("Authorization", `Bearer ${expired}`);
  expect(res.status).toBe(401);
});

what the link proves

  • Expired JWT returns 401
  • Refresh flow is not attempted for expired access tokens
  • Go-to-definition from the idea lands on the test(...) line