You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
547 B

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',
);
});

Powered by TurnKey Linux.