Skip to content

Commit a883484

Browse files
committed
docs: add testing gotchas to CLAUDE.md
Document burner email domain pitfall and MSW/Remix bundling issue to prevent future debugging time.
1 parent e191ae8 commit a883484

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

CLAUDE.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,21 @@ Transaction, Content, Consumption, AuditLog.
5555
- `/login``/magic` - Email magic link auth
5656
- `/dashboard/*` - Protected course management
5757

58+
## Testing Gotchas
59+
60+
### Mock emails must not use burner domains
61+
62+
The `burner-email-providers` package blocks domains like `@example.com` during
63+
login. Mock/seed data must use a non-burner domain (e.g. `@rumahberbagi.test`).
64+
If e2e login tests fail silently (no magic link sent, no error logged), check
65+
the email domain first.
66+
67+
### MSW and Remix bundling
68+
69+
MSW v2 interceptors break when bundled by Remix's esbuild. Instead of relying on
70+
MSW to intercept API calls in e2e mode, the app writes the magic link fixture
71+
directly when `RUNNING_E2E=true` (see `email.server.tsx`).
72+
5873
## Commit Convention
5974

6075
Conventional Commits: `<type>[scope]: <description>`

0 commit comments

Comments
 (0)