Agent skill · supabase
studio-testing
Testing strategy for Supabase Studio. Use when writing tests, deciding
What it needs
About 4k tokens when loaded.
What this skill does
Studio Testing Strategy How to write and structure tests for apps/studio/. The core principle: push logic out of React components into pure utility functions, then test those functions exhaustively. Only use component tests for complex UI interactions. Use E2E tests for features shared between self-hosted and platform. When to Apply Reference these guidelines when: Writing new tests for Studio code Deciding which type of test to write (unit, component, E2E) Extracting logic from a component to make it testable Reviewing whether test coverage is sufficient Adding a new feature that needs tests Rule Categories by Priority Priority Category Impact Prefix -------- ---------------- -------- ---------- 1 Logic Extraction CRITICAL testing- 2 Test Coverage CRITICAL testing- 3 Component Tests HIGH testing- 4 E2E Tests HIGH testing- Quick Reference 1. Logic Extraction (CRITICAL) testing-extract-logic - Remove logic from components into .utils.ts files as pure functions: args in, return out 2. Test Coverage (CRITICAL) testing-exhaustive-permutations - Test every permutation of utility functions: happy path, malformed input, empty values, edge cases 3. Component Tests (HIGH) testing-component-tests-ui-only - Only write component tests for complex UI interaction logic, not business logic 4. E2E Tests (HIGH) testing-e2e-shared-features - Write E2E tests for features used in both self-hosted and platform; cover clicks AND keyboard shortcuts Decision Tree: Which Test Type? 1. Extract Logic Into Utility Files (CRITICAL) Remove as much logic from components as possible. Put it in co-located .utils.ts files as pure functions: arguments in, return value out. File naming: Utility: ComponentName.utils.ts next to the component Test: tests/components/.../ComponentName.utils.test.ts mirroring the source path 2. Test Every Permutation (CRITICAL) Once logic is extracted, test exhaustively. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills supabase/studio-testing--589b80