testing

Test database logic with pgTAP and frontend transformations with Vitest.

Updated Oct 26, 2025
One-click install
npx skills add https://github.com/discountedcookie/10x-mapmaster --skill testing-discountedcookie
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing
Source: https://github.com/discountedcookie/10x-mapmaster/tree/main/.opencode/skills/testing
Command: npx skills add https://github.com/discountedcookie/10x-mapmaster --skill testing-discountedcookie

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill emphasizes a testing-first approach, prioritizing database tests and targeted frontend tests for complex logic.

Core Features & Use Cases

  • Test philosophy: Focus on database tests (pgTAP) for business logic.
  • Before/after checks: Run full test suite or targeted tests as needed.
  • Test guidance: Clear instructions on when to add tests and what to verify.

Quick Start

Before changing code, run tests; after changes, run tests again and address failures.

Frequently Asked Questions about testing

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

FAQPage Schema
How do I run tests to catch regressions in my code changes?

Run your test suite before and after code changes to validate modifications. This Skill supports pgTAP for database logic and Vitest for frontend transformations, letting you execute focused tests that prevent regressions without running unnecessary boilerplate.

When should I write database tests versus frontend tests?

Prioritize database tests using pgTAP for business logic and complex data transformations. Use Vitest for frontend tests targeting non-obvious edge cases and complex logic. Focus testing effort on areas where bugs cause the most harm, not on boilerplate coverage.

Can I use pgTAP and Vitest together in a single test workflow?

Yes. This Skill provides a standardized bun-based test workflow that integrates both pgTAP for database validation and Vitest for frontend logic, letting you run targeted tests across your entire stack in one consistent process.

How do I avoid writing unnecessary boilerplate tests?

Focus on testing complex logic and new database functions rather than trivial code paths. This Skill emphasizes selective test coverage: write tests only where they catch real bugs, especially in data transformations and database queries where edge cases are hardest to spot manually.

What's the test-first approach and why does it matter?

Test-first means running tests before making changes to establish baseline behavior, then running again after modifications to confirm nothing broke. This approach surfaces regressions early and validates that your changes meet requirements without introducing unintended side effects.