vinterliste/tests
Ole-Morten Duesund e64d5450f8 fix(invites): build share URL on the client, not the server
server/invites.ts derived the share URL from c.req.url — i.e., from
the API request's host. In production the API and SPA share an
origin so this happened to work; in dev where the SPA runs on :5173
and the API on :3000, the generated link pointed at the API
(http://localhost:3000/invite/<token>) which serves nothing.

Fix: the server no longer returns a `url` field. The token is the
canonical artefact; the SPA builds the share link itself via
`${window.location.origin}/invite/${token}`, which is always the
right origin regardless of split-process dev or single-process prod.

  - shared/types.ts: InviteEntry.url removed
  - server/invites.ts: drop originOf() and the URL field in toEntry()
  - frontend Profile.svelte: new inviteUrl() helper; the displayed
    <code> and the clipboard payload both use it
  - tests/social.test.ts: assertion checks token shape instead of
    the URL field

93 tests still pass.
2026-05-25 16:25:55 +02:00
..
activities.test.ts test: coverage for all major server features 2026-05-25 15:37:53 +02:00
admin.test.ts test: coverage for all major server features 2026-05-25 15:37:53 +02:00
auth.test.ts Close the recovery lockout-DoS hole on /auth/recovery-complete 2026-05-25 12:28:26 +02:00
crypto.test.ts Scaffold Vinterliste — end-to-end encrypted winter activity list 2026-05-25 12:27:14 +02:00
engagement.test.ts test: coverage for all major server features 2026-05-25 15:37:53 +02:00
friends.test.ts test(friends): lock in directional visibility semantics 2026-05-25 15:02:57 +02:00
helpers.ts test: coverage for all major server features 2026-05-25 15:37:53 +02:00
profile.test.ts test: coverage for all major server features 2026-05-25 15:37:53 +02:00
social.test.ts fix(invites): build share URL on the client, not the server 2026-05-25 16:25:55 +02:00