testing-typescript

testing-typescript is a skill for Claude Code from qte77/claude-code-plugins. It costs 38 tokens per session (769 once invoked), scanned A, original, Apache-2.0.

A TypeScript testing guide for unit, integration, and React component tests, using tools such as Vitest and Testing Library. Integration tests check how parts of a system work together.

In plain words
What is it for?
Use it to test functions, API interactions, mocked services, and React component behavior with Arrange-Act-Assert structure.
Why use it?
It helps choose an appropriate test style and apply test-first practices to TypeScript code and React interfaces.

Skill for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: mentions Claude Code.

Part of the typescript-dev plugin — 3 skills shipped together

Good fit Use it to test functions, API interactions, mocked services, and React component behavior with Arrange-Act-Assert structure.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/qte77/claude-code-plugins/testing-typescript
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.

Any agent
npx skills add qte77/claude-code-plugins --skill testing-typescript
Clone the repo
git clone --depth 1 https://github.com/qte77/claude-code-plugins

Made for: Claude Code.

Or install typescript-dev, the plugin that ships this one along with the rest of its 3 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for testing-typescript

README.md
[![agentmods](https://agentmods.dev/badge/skills/qte77/claude-code-plugins/testing-typescript.svg)](https://agentmods.dev/skills/qte77/claude-code-plugins/testing-typescript)
Your own site
<a href="https://agentmods.dev/skills/qte77/claude-code-plugins/testing-typescript"><img src="https://agentmods.dev/badge/skills/qte77/claude-code-plugins/testing-typescript.svg" alt="Measured on agentmods" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 769 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00038 $0.00769
Opus 5 $0.00019 $0.00385
Sonnet 5 $0.00008 $0.00154
Haiku 4.5 $0.00004 $0.00077

Measured 3d ago against content hash 5228e854148a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

testing-typescript 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 3d ago.

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.

plugins/typescript-dev/skills/testing-typescript/SKILL.md · 101 lines

How it starts

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

TypeScript Testing

Target: $ARGUMENTS

Writes focused, behavior-driven tests following project testing strategy.

Quick Reference

TDD methodology (language-agnostic): See tdd-core plugin (testing-tdd skill)

TypeScript-specific documentation: references/

  • references/testing-strategy-ts.md — TypeScript tools (vitest, @testing-library/react, MSW)
  • references/tdd-best-practices-ts.md — TypeScript TDD examples (extends tdd-core)

Quick Decision

vitest (default): Use it/test for known cases, vi.mock for module mocking. Works at unit/integration levels.

@testing-library/react (components): Use for React component behavior testing with render, screen, userEvent.

See references/testing-strategy-ts.md for full methodology comparison.

TDD Essentials (Quick Reference)

Cycle: RED (failing test / type error) -> GREEN (minimal pass) -> REFACTOR (clean up)

Structure: Arrange-Act-Assert (AAA)

it('calculates order total from item prices', () => {
  // ARRANGE
  const items = [{ price: 10, qty: 2 }, { price: 5, qty: 1 }];
  const calculator = new OrderCalculator();

  // ACT
  const total = calculator.total(items);

  // ASSERT
  expect(total).toBe(25);
});

Component Testing Priorities

Priority Area Example
CRITICAL User interactions Button click triggers handler
CRITICAL Conditional rendering Error state shows message
HIGH Form validation Invalid input shows error
HIGH Async data loading Loading -> success/error states

What to Test (KISS/DRY/YAGNI)

High-Value: Business logic, error paths, component behavior, async flows, custom hooks

Avoid: Type system behavior, library internals, CSS styling, implementation details

See references/testing-strategy-ts.md -> "Patterns to Remove" for full list.

Naming Convention

Format: {module} > {component} > {behavior}

describe('UserService', () => {
  it('creates a new user with valid data', () => { ... });
  it('rejects duplicate email addresses', () => { ... });
});

Read the full file on GitHub · 101 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 3d ago First seen · 101 lines · 38 tokens per session scan A 5228e854148a

Subscribe to this mod's changes

testing-typescript is a skill published in the GitHub repository qte77/claude-code-plugins (2 stars, last pushed yesterday), licensed Apache-2.0. It adds 38 tokens to every session and 769 once invoked, about $0.0002 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-09-03.

Related

Other skills, from other repositories