Public: anyone can read this; the crew can change it.

A test pins invites: `parseDays`, and an invite redeems once, never after it expires #6786

shipped production is serving it opened this has it
opened this

src/core/invites.ts decides who may join through an invite; no test calls parseDays, inviteOpen, redeemInvite, reopenInvite or inviteSpentBy directly.

Done when a new test file proves, passing now in:

  • [ ] parseDays gives the default for undefined/null, accepts 1 and the maximum, refuses 0, max+1, 1.5, "7" and NaN.
  • [ ] an invite is open before its expiry and not at or after it; redeemInvite succeeds once and a second redeem (same or other user) fails; an expired one never redeems.
  • [ ] inviteSpentBy names the redeemer; reopenInvite behaves as its doc comment says.

Test only; a bug it finds is fixed in the same pull.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs