From 7f8a41fd34af4339a262995bc6a1ae63996492ef Mon Sep 17 00:00:00 2001 From: hsiegeln <37154749+hsiegeln@users.noreply.github.com> Date: Fri, 24 Apr 2026 17:04:01 +0200 Subject: [PATCH] Plan fix: mirror sign-up URL test coverage additions for Task 3 --- .../plans/2026-04-24-cameleer-website.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/docs/superpowers/plans/2026-04-24-cameleer-website.md b/docs/superpowers/plans/2026-04-24-cameleer-website.md index 9425b08..866e8d5 100644 --- a/docs/superpowers/plans/2026-04-24-cameleer-website.md +++ b/docs/superpowers/plans/2026-04-24-cameleer-website.md @@ -379,7 +379,7 @@ export default defineConfig({ - [ ] **Step 2: Write the failing test `src/config/auth.test.ts`** ```ts -import { describe, it, expect, beforeEach } from 'vitest'; +import { describe, it, expect } from 'vitest'; import { resolveAuthConfig } from './auth'; describe('resolveAuthConfig', () => { @@ -417,6 +417,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',