From 3a155efa6997d6e448e50c047522e325bc9719c6 Mon Sep 17 00:00:00 2001 From: hsiegeln <37154749+hsiegeln@users.noreply.github.com> Date: Fri, 24 Apr 2026 17:03:57 +0200 Subject: [PATCH] Add sign-up URL test coverage and remove unused beforeEach import --- src/config/auth.test.ts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/config/auth.test.ts b/src/config/auth.test.ts index b1b08c8..a21716e 100644 --- a/src/config/auth.test.ts +++ b/src/config/auth.test.ts @@ -1,4 +1,4 @@ -import { describe, it, expect, beforeEach } from 'vitest'; +import { describe, it, expect } from 'vitest'; import { resolveAuthConfig } from './auth'; describe('resolveAuthConfig', () => { @@ -36,6 +36,21 @@ describe('resolveAuthConfig', () => { })).toThrow(/PUBLIC_SALES_EMAIL/); }); + it('throws if PUBLIC_AUTH_SIGNUP_URL is missing', () => { + expect(() => resolveAuthConfig({ + PUBLIC_AUTH_SIGNIN_URL: 'https://auth.cameleer.io/sign-in', + PUBLIC_SALES_EMAIL: 'sales@cameleer.io', + })).toThrow(/PUBLIC_AUTH_SIGNUP_URL/); + }); + + it('throws if PUBLIC_AUTH_SIGNUP_URL is not https', () => { + expect(() => resolveAuthConfig({ + PUBLIC_AUTH_SIGNIN_URL: 'https://auth.cameleer.io/sign-in', + PUBLIC_AUTH_SIGNUP_URL: 'http://auth.cameleer.io/sign-in?first_screen=register', + PUBLIC_SALES_EMAIL: 'sales@cameleer.io', + })).toThrow(/must be https/); + }); + it('exposes signUpUrl distinct from signInUrl', () => { const cfg = resolveAuthConfig({ PUBLIC_AUTH_SIGNIN_URL: 'https://auth.cameleer.io/sign-in',