testing-fundamentals

A guide to planning and reviewing software tests, from small checks of individual functions to tests of complete user journeys. It explains unit, integration, and end-to-end tests and covers tools such as Vitest, Jest, Playwright, pytest, and Go's test tools.

In plain words
What is it for?
Use it when writing or reviewing tests, deciding what to test, checking coverage, choosing testing tools, or learning patterns such as Arrange-Act-Assert and test doubles.
Why use it?
It helps decide what needs testing and which kind of test fits the job, so teams do not rely only on slow full-application checks or miss important cases.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/danielpodolsky/ownyourcode/testing
Any agent
npx skills add DanielPodolsky/ownyourcode --skill testing
Clone the repo
git clone --depth 1 https://github.com/DanielPodolsky/ownyourcode

Made for: Claude Code, Codex.

Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,469 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00067 $0.01469
Opus 5 $0.00034 $0.00734
Sonnet 5 $0.00013 $0.00294
Haiku 4.5 $0.00007 $0.00147

Measured yesterday against content hash ceb4ef6b6524, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

testing-fundamentals scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/fundamentals/testing/SKILL.md · 219 lines

How it starts

The opening of the file, as written. The whole thing — 219 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Testing Fundamentals Review

"If you can't test it, you don't understand it. Tests are proof of understanding."

When to Apply

Activate this skill when:

  • Reviewing test files (*.test.ts, *.spec.ts, *.test.js)
  • Junior asks about testing strategy
  • Completing a feature without tests
  • Discussing coverage or test quality

The Testing Pyramid

        ▲
       ╱ ╲     E2E (10%)
      ╱   ╲    Playwright - Full user flows
     ╱─────╲
    ╱       ╲  Integration (20%)
   ╱         ╲ Vitest + RTL - Component interactions
  ╱───────────╲
 ╱             ╲ Unit (70%)
╱               ╲ Vitest - Functions, utils, logic
─────────────────
  • Unit Tests (70%): Fast, isolated, test one thing
  • Integration Tests (20%): Components working together
  • E2E Tests (10%): Critical user journeys only

Stack-Specific Framework Guide

Stack Unit/Integration E2E
Vite + React Vitest + React Testing Library Playwright
Create React App Jest + RTL Playwright
Next.js Vitest or Jest + RTL Playwright
Node.js Vitest (native ESM) -
Python pytest -
Go go test -

Why Vitest for Vite?

  • 10-20x faster than Jest in watch mode
  • Native ESM support
  • Same config as Vite (vite.config.ts)
  • Compatible with Jest API

What to Test (The 3 Questions)

  1. Happy Path: Does it work when everything goes right?
  2. Edge Cases: What happens with empty, null, max values?
  3. Error States: Does it fail gracefully?

Good Tests Check:

  • Component renders without crashing
  • User interactions work (click, type, submit)
  • Error states display correctly
  • Loading states appear and disappear
  • Data flows correctly through the component

Bad Tests Check:

  • Implementation details (internal state, method calls)
  • Styling or CSS classes
  • Third-party library internals
  • Snapshot tests of large components (brittle)

Common Mistakes (Anti-Patterns)

Read the full file on GitHub · 219 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 219 lines · 67 tokens per session scan A ceb4ef6b6524

Subscribe to this mod's changes

testing-fundamentals is a skill published in the GitHub repository DanielPodolsky/ownyourcode (276 stars, last pushed 2mo ago), licensed MIT. It adds 67 tokens to every session and 1,469 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

frontend-design

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI).…

bytedance/deer-flow · 77 tokens

agent-browser

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a…

shanraisshan/claude-code-best-practice · 108 tokens

analyze-performance-traces

Analyze Chrome, Chromium, Electron, React DevTools, or Perfetto-compatible JSON traces and audit user-reported profiling findings without loading large artifacts into context; prove trigger-to-render/layout chains, separate measured facts from source inference, find exact code choke points, classify forced layout and…

tutti-os/tutti · 127 tokens

test-automation

Execute Vitest and Playwright test suites with result collection and failure analysis.

a5c-ai/babysitter · 0 tokens

moai-domain-frontend

Frontend development specialist covering React 19, Next.js 16, Vue 3.5, and modern UI/UX patterns with component architecture. Use when building web UIs, implementing components, optimizing frontend performance, or integrating state management.

modu-ai/moai-adk · 54 tokens

scrape-nowcoder

基于 CDP 原生 WebSocket 抓取牛客网面经文章。当用户说"抓牛客"、"爬牛客面经"、"nowcoder 抓取"、"抓取面经列表"时触发。通过 Chrome 调试端口直接连接已登录的浏览器会话,支持首页、话题、搜索分页和详情全文抓取,输出 Markdown。.

ranxi2001/zero2Agent · 92 tokens