nextbase-testing
Skill827 starsChanged 2 months agoMITView on GitHub
Use for choosing, writing, or running NextBase Vitest, Testing Library, Playwright, smoke, integration, or end-to-end tests and for deciding the required local verification commands.
- Reads credentials
In this repository23 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .agents/skills/vercel-composition-patterns/AGENTS.mdAGENTS.md
- .agents/skills/vercel-react-best-practices/AGENTS.mdAGENTS.md
- nextbase-architectureSkill
- nextbase-auth-ssrSkill
- nextbase-cache-componentsSkill
- nextbase-database-testingSkill
- nextbase-safe-actions-dataSkill
- nextbase-ui-patternsSkill
- next-cache-components-optimizerSkill
- safe-action-advancedSkill
- safe-action-clientSkill
- safe-action-hooksSkill
- safe-action-middlewareSkill
- safe-action-testingSkill
- shadcnSkill
- supabase-postgres-best-practicesSkill
- supabase-schema-migrationsSkill
- supabaseSkill
- turborepoSkill
- vercel-composition-patternsSkill
- vercel-react-best-practicesSkill
- web-design-guidelinesSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
Do not replace an integration test with mocks when cookie propagation, RLS, navigation, or framework behavior is the subject under test.
- Very specific: line 22
Follow ./setup.sh and the root AGENTS.md for local setup.
- Very specific: line 23
Keep environment files at the repository root.
- Distinctive: line 24
Start local Supabase and sync its generated keys before auth, database, or E2E work.
- Distinctive: line 25
Use the repository's pinned Node and pnpm versions rather than changing toolchains inside a test.
- Distinctive: line 37
Run the smallest relevant command first, then expand in proportion to risk:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
NextBase Testing
Choose the Narrowest Honest Test
| Behavior | Test layer |
| Pure utilities, schemas, action helpers, and error mapping | Vitest |
| React rendering and user interaction isolated from navigation | Testing Library with Vitest |
| Auth, redirects, routing, browser state, and complete user flows | Playwright |
| Schema, constraints, policies, and RLS | pnpm --dir apps/database test-db |
| Fast page availability and obvious UI regressions | Browser smoke check plus console inspection |
Do not replace an integration test with mocks when cookie propagation, RLS, navigation, or framework behavior is the subject under test.
Environment
- Follow
./setup.shand the rootAGENTS.mdfor local setup. - Keep environment files at the repository root. Never overwrite an existing
.env.localor.env.development.local. - Start local Supabase and sync its generated keys before auth, database, or E2E work.
- Use the repository's pinned Node and pnpm versions rather than changing toolchains inside a test.
Test Design
- Select by accessible role, name, label, or an explicit stable test ID. Avoid marketing copy, generated class names, and positional selectors.
- Give each test unique data and clean it up. Do not depend on execution order.
- Assert user-visible outcomes and durable state, not implementation details.
- Capture the failing regression before fixing it when practical.
- For smoke checks, verify the expected HTTP status, the key interactive landmark, and browser console errors; a listening port alone is not success.
Verification Ladder
Run the smallest relevant command first, then expand in proportion to risk:
pnpm lint
pnpm typecheck
pnpm test
pnpm build
pnpm test:e2eDatabase changes also require pnpm --dir apps/database test-db. Report any skipped layer and the concrete external prerequisite that blocked it.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

