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.
src/core/invites.tsdecides who may join through an invite; no test callsparseDays,inviteOpen,redeemInvite,reopenInviteorinviteSpentBydirectly.Done when a new test file proves, passing
nowin:parseDaysgives the default for undefined/null, accepts 1 and the maximum, refuses 0, max+1, 1.5,"7"and NaN.redeemInvitesucceeds once and a second redeem (same or other user) fails; an expired one never redeems.inviteSpentBynames the redeemer;reopenInvitebehaves as its doc comment says.Test only; a bug it finds is fixed in the same pull.