Configuration
NoFlake is configured via a .noflakerc.json file in your project root. Created automatically by noflake init.
Full config reference
{
"baseUrl": "http://localhost:3000",
"testDir": "tests/e2e",
"maxRetries": 3,
"model": "claude-sonnet-4-20250514",
"auth": {
"strategy": "auto",
"loginUrl": "/login",
"testUser": {
"email": "test@example.com",
"password": "testpassword"
}
},
"ignore": ["**/admin/**", "**/internal/**"]
}Options
| Key | Type | Default | Description |
|---|---|---|---|
baseUrl | string | http://localhost:3000 | The URL where your dev server runs. Used by Playwright for navigation. |
testDir | string | tests/e2e | Directory where generated test files are written. |
maxRetries | number | 3 | Max self-healing attempts per test during generation. |
model | string | claude-sonnet-4-20250514 | The Anthropic model used for test generation. |
auth.strategy | string | auto | Auth detection strategy. auto detects your auth provider automatically. |
auth.loginUrl | string | /login | Path to your login page for auth flow tests. |
auth.testUser | object | — | Credentials for a test user. Used during E2E auth flows. |
ignore | string[] | [] | Glob patterns for routes/files to exclude from test generation. |
Auth strategies
When set to auto, NoFlake scans your dependencies to detect:
- NextAuth / Auth.js — Detected via
next-authpackage - Clerk — Detected via
@clerk/nextjs - Supabase Auth — Detected via
@supabase/supabase-js - Lucia — Detected via
luciapackage - Firebase — Detected via
firebasepackage
Security tip:Don't commit real credentials in your config. Use environment variables or a separate
.env.test file for test user credentials, and add .noflakerc.json to your .gitignore if it contains sensitive data.