Loading...
Loading...
Testing strategy for Supabase Studio. Use when writing tests, deciding what type of test to write, extracting logic from components into testable utility functions, or reviewing test coverage. Covers unit tests, component tests, and E2E test selection criteria.
npx skill4agent add supabase/supabase studio-testingapps/studio/| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Logic Extraction | CRITICAL | |
| 2 | Test Coverage | CRITICAL | |
| 3 | Component Tests | HIGH | |
| 4 | E2E Tests | HIGH | |
testing-extract-logic.utils.tstesting-exhaustive-permutationstesting-component-tests-ui-onlytesting-e2e-shared-featuresIs the logic a pure transformation (parse, format, validate, compute)?
YES -> Extract to .utils.ts, write unit test with vitest
NO -> Does the feature involve complex UI interactions?
YES -> Is it used in both self-hosted and platform?
YES -> Write E2E test in e2e/studio/features/
NO -> Write component test with customRender
NO -> Can you extract the logic to make it pure?
YES -> Do that, then unit test it
NO -> Write a component testrules/testing-extract-logic.md
rules/testing-exhaustive-permutations.mdAGENTS.md| What | Where |
|---|---|
| Util test examples | |
| Component test examples | |
| E2E test example | |
| E2E helpers pattern | |
| Custom render | |
| MSW mock setup | |
| Test README | |
| Vitest config | |
| Related skills | |