Skip to content

Rename leeway tests after the scenario they cover - #43

Merged
jstayton merged 1 commit into
developmentfrom
test/leeway-test-names
Aug 27, 2026
Merged

jstayton merged 1 commit into
developmentfrom
test/leeway-test-names

Conversation

@jstayton

Copy link
Copy Markdown
Contributor

The four timestamp leeway tests named a direction that reads backwards. Setting the clock to sentAtMs + 5min puts the receipt time after the signed timestamp — so the webhook arrived late — but that test was named for the "future" leeway window. Its error-case twin read "if the timestamp is outside the future leeway window" while firing on a timestamp five minutes in the past.

Naming them after the scenario instead drops the frame of reference entirely, so there's nothing left to get backwards. The assertions are unchanged, and "exactly" stays on the two accept cases to keep the signal that they're boundary tests.

🤖 Generated with Claude Code

The old names described a direction that reads backwards. Setting the
clock to `sentAtMs + 5min` puts the receipt time after the signed
timestamp — the webhook arrived late — but that test was named for the
"future" leeway window, and its error-case twin read "the timestamp is
outside the future leeway window" while firing on a timestamp in the
past.

Naming them after the scenario drops the frame of reference entirely, so
there's nothing left to get backwards. The assertions are unchanged.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@jstayton
jstayton merged commit 76a455d into development Aug 27, 2026
4 checks passed
@jstayton
jstayton deleted the test/leeway-test-names branch August 27, 2026 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant