# Discountedcookie 10x Mapmaster Testing

> Testing

- Skill: `tomevault-io/discountedcookie-10x-mapmaster-testing` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/discountedcookie-10x-mapmaster-testing`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/discountedcookie-10x-mapmaster-testing/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/discountedcookie-10x-mapmaster-testing

---


# Testing

Verify changes don't break things. Don't create test bloat.

> **Announce:** "I'm running tests to verify the changes."

## Philosophy

**Database (pgTAP):** This is where real logic lives. Test it thoroughly.

**Frontend (Vitest):** Thin RPC layer. Only test:
- Complex transformations
- Non-obvious edge cases
- NOT: "does this call that function"

## Workflow

**Before implementing:**
```bash
bun run test
```
If tests fail, fix them first.

**After implementing:**
```bash
bun run test
```
If tests fail, your change broke something. Fix it.

## When to Add Tests

**YES - add tests for:**
- New database functions with business logic
- Complex data transformations
- Non-obvious edge cases you discovered

**NO - don't test:**
- "Does this function call that function"
- Pinia store initialization
- Vue component mounting
- API calls with mocked responses
- Obvious behavior readable from code

## Commands

```bash
bun run test        # All tests (unit + db)
bun run test:unit   # Frontend only
bun run test:db     # Database only (pgTAP)
```

## If Tests Fail

1. Read the error message
2. Check if YOUR change caused it
3. If yes → fix your code
4. If no → fix the test or report the issue

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/discountedcookie) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-16 -->

