import { expect, it } from 'vitest'; import { invitationUrl } from '../shared/invitations.mjs'; it('shares the public HTTPS address in production even behind an internal proxy', () => { expect(invitationUrl('E4DAC4D795E6', 'http://192.168.18.155', true)).toBe( 'https://juegoland.imaginacion.com/?invite=E4DAC4D795E6', ); }); it('keeps invitations local in development and encodes the invitation parameter', () => { expect(invitationUrl('a&b', 'http://localhost:4173', false)).toBe( 'http://localhost:4173/?invite=a%26b', ); });