test-suite-architect

Generate service tests with Supabase client mocks for TypeScript services.

Updated Dec 23, 2025
One-click install
npx skills add https://github.com/sf-bcca/PromptArchitect-Studio --skill test-suite-architect
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: test-suite-architect
Source: https://github.com/sf-bcca/PromptArchitect-Studio/tree/main/.gemini/skills/test-suite-architect
Command: npx skills add https://github.com/sf-bcca/PromptArchitect-Studio --skill test-suite-architect

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Generates consistent service-layer tests for Supabase-integrated services, streamlining test scaffolding and ensuring robust mocks.

Core Features & Use Cases

  • Scaffold Service Tests: Generates a test file under test/services for a given service, pre-configured with a comprehensive Supabase client mock.
  • Mocking Guidance: Provides reference patterns for mocking fluent Supabase queries to enable reliable unit tests across services.

Quick Start

Run the scaffold_service_test.cjs script with your service name to generate a test scaffold.

Frequently Asked Questions about test-suite-architect

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate unit tests for TypeScript services integrated with Supabase?▼

You can auto-generate unit tests for Supabase-integrated TypeScript services by running a scaffold script that creates a test file pre-configured with a comprehensive Supabase client mock. This ensures reliable testing without hitting the actual database.

What is the best way to mock fluent Supabase queries for service tests?▼

The best way to mock fluent Supabase queries is to use provided reference patterns that guide the setup of mocked database and edge function interactions. This enables reliable unit tests across services by stubbing chained query builder methods.

Does test scaffolding for Supabase services support edge function mocking?▼

Yes, test scaffolding for Supabase services supports edge function mocking. The generated test files come pre-configured with a comprehensive client mock that covers both database and edge function interactions for reliable unit testing.

How do I scaffold a test file for a specific service in my project?▼

To scaffold a test file for a specific service, run the scaffold script with your service name. This automatically generates a new test file under the test/services directory in your project structure, ready for unit testing.

Why do my Supabase service tests fail when the database is not available?▼

Supabase service tests fail without a database because they attempt real network connections. Scaffolding tests with robust mocked database and edge function interactions isolates the service layer, ensuring tests pass reliably without a live database connection.