supabase-test-testing
Skill by supabase
Writes unit and widget tests for Dart and Flutter code that uses Supabase, with the supabase_test package. It runs a real SupabaseClient with stubbed HTTP responses and an in-memory realtime socket. Aimed at developers testing queries, auth, storage and realtime.
Install supabase-test-testing
Built from the published package, never by AI.
git clone --depth 1 https://github.com/supabase/supabase-flutter /tmp/supabase-flutter && mkdir -p ~/.claude/skills && cp -r /tmp/supabase-flutter/packages/supabase_test/skills/supabase-test-testing ~/.claude/skills/supabase-test-testingRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/supabase/supabase-flutter /tmp/supabase-flutter && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/supabase-flutter/packages/supabase_test/skills/supabase-test-testing ~/.gemini/antigravity-cli/skills/supabase-test-testingAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install supabase-test-testing in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill teaches an AI assistant to write unit and widget tests for Dart and Flutter code that uses Supabase, using the supabase_test package. Tests run against a real SupabaseClient created by testSupabaseClient or initializeTestSupabase. HTTP requests are answered by stub methods on MockSupabaseHttpClient, and the realtime socket runs in memory through MockRealtimeTransport. The skill covers tables, rpc, edge functions, auth, storage and realtime.
The skill sets rules for the tests. They must not mock SupabaseClient or the query builders, must use signInTestUser for signed-in state, and must assert on recorded requests instead of wrapping the client. It is meant for developers who write Dart or Flutter tests for apps built on Supabase. It notes that end-to-end coverage should use a local stack started with supabase start.
Written from the project's SKILL.md and checked against it.
What it can do
- Stub table queriesAnswers table requests with stubTable, using rows in the JSON shape PostgREST returns.
- Stub rpc and edge functionsAnswers database function and edge function calls with stubRpc and stubEdgeFunction.
- Test sign-in flowsPuts a client into a signed-in state with signInTestUser or tests real sign-in calls with stubSignIn.
- Stub storage callsAnswers upload, download, signed URL, list and remove requests with storage stub methods.
- Simulate errors and retriesUses stubError, stubStall and stubStatuses to test failures, hangs and retry handling.
- Assert on sent requestsChecks what the client sent with the requests and requestsTo properties.
- Test realtimeUses MockRealtimeTransport to emit Postgres changes, broadcasts and presence events.
- Test Flutter widgetsUses initializeTestSupabase so widgets reading Supabase.instance.client work in tests.
What you need
- Dart or Flutter project
- supabase_test as a dev dependency
- test package, or flutter_test in a Flutter app
- supabase_flutter for widget tests
Try asking
- Write a test that stubs the books table and checks a selectOnly query.
- Test my sign-in flow with stubSignIn and check the returned user id.
- Add a realtime test that emits an insert on the books table.
Good to know
- Stubs return the rows given and do not evaluate filters.
- testSupabaseClient does not retry unless retryOptions is passed.
- Mocks are for fast unit tests, so end-to-end coverage needs a local stack.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: packages/supabase_test/skills/supabase-test-testing/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to supabase-test-testing
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
supabase-test-testing: common questions
Does this skill mock the Supabase client?
No. The rules say never to mock or subclass SupabaseClient or the query builders. Tests use a real client whose HTTP requests are answered by stubs.
Are query filters applied to stubbed rows?
No. The source says filters are not evaluated, so stubbed rows should be the rows the code under test should receive.
Can it test Flutter widgets that use Supabase?
Yes. initializeTestSupabase from supabase_flutter/testing.dart initializes Supabase.instance with the same test defaults.
How do I install supabase-test-testing?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is supabase-test-testing free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is supabase-test-testing safe to use?
It scores 77 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to supabase-test-testing?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
