Skip to main content

nextbase-testing

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.

Informações da origem

Repositório
imbhargav5/nextbase-nextjs-supabase-starter
Última atividade na origem
1 de setembro de 2026 às 00:20
Idioma detectado do SKILL.md
inglês
Estrelas
827
Forks
215

Opções de instalação

Por padrão, está selecionado o prompt que primeiro revisa a origem. Você pode mudar para um comando direto ou baixar uma cópia local.

Revise os arquivos de origem

Leia o SKILL.md e os arquivos complementares exibidos pelo SkillsMP antes de decidir se vai instalar.

Exibindo SKILL.md

SKILL.md
Instruções da origem · Visualização somente leitura
name
nextbase-testing
description
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.
# 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.sh` and the root `AGENTS.md` for local setup. - Keep environment files at the repository root. Never overwrite an existing `.env.local` or `.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: ```bash pnpm lint pnpm typecheck pnpm test pnpm build pnpm test:e2e ``` Database changes also require `pnpm --dir apps/database test-db`. Report any skipped layer and the concrete external prerequisite that blocked it.
Ver no GitHub