typescript-testing

typescript-testing is a skill for Claude Code, Codex from DmitriyYukhanov/claude-plugins. It costs 31 tokens per session (1,250 once invoked), scanned A, original, MIT.

A guide for testing TypeScript code with Jest or Vitest, JavaScript testing tools, plus tools for browser-based tests.

In plain words
What is it for?
Use it to write unit and integration tests, mock dependencies, test browser flows with Cypress or Playwright, and measure coverage.
Why use it?
It helps choose the testing tool already used by the project and organize tests around isolated units, connected modules, and complete user flows.

Skill for Claude CodeCodex

Part of the typescript-dev plugin — 3 skills, 1 command, 1 agent shipped together

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/dmitriyyukhanov/claude-plugins/typescript-testing
Any agent
npx skills add DmitriyYukhanov/claude-plugins --skill typescript-testing
Clone the repo
git clone --depth 1 https://github.com/DmitriyYukhanov/claude-plugins

Made for: Claude Code, Codex.

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

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 typescript-testing

README.md
[![agentmods](https://agentmods.dev/badge/skills/dmitriyyukhanov/claude-plugins/typescript-testing.svg)](https://agentmods.dev/skills/dmitriyyukhanov/claude-plugins/typescript-testing)
Your own site
<a href="https://agentmods.dev/skills/dmitriyyukhanov/claude-plugins/typescript-testing"><img src="https://agentmods.dev/badge/skills/dmitriyyukhanov/claude-plugins/typescript-testing.svg" alt="Measured on agentmods" height="20"></a>
Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,250 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.00031 $0.01250
Opus 5 $0.00015 $0.00625
Sonnet 5 $0.00006 $0.00250
Haiku 4.5 $0.00003 $0.00125

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

Security

Grade A, and why

typescript-testing 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 4d 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/typescript-testing/SKILL.md · 194 lines

How it starts

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

TypeScript Testing Skill

You are a testing specialist for TypeScript projects.

Testing Frameworks

Framework Detection

  • jest.config.* or "jest" in package.json → Jest
  • vitest.config.* or "vitest" in package.json → Vitest
  • cypress.config.* → Cypress (E2E)
  • playwright.config.* → Playwright (E2E)
  • If both Jest and Vitest are present, follow the scripts used by CI and existing test files in the target package

Test Distribution

  • ~75% Unit Tests: Fast, isolated, fully mocked
  • ~20% Integration Tests: Module interactions, API contracts
  • ~5% E2E Tests: Full user flows (Cypress/Playwright)

Unit Test Patterns

Examples below use Jest APIs. For Vitest, replace jest with vi and import helpers from vitest.

Arrange-Act-Assert

describe('UserService', () => {
  let sut: UserService;
  let mockRepository: jest.Mocked<IUserRepository>;

  beforeEach(() => {
    mockRepository = {
      findById: jest.fn(),
      save: jest.fn(),
    };
    sut = new UserService(mockRepository);
  });

  afterEach(() => {
    jest.clearAllMocks();
  });

  describe('getUser', () => {
    it('should return user when found', async () => {
      // Arrange
      const expectedUser = { id: '1', name: 'Test' };
      mockRepository.findById.mockResolvedValue(expectedUser);

      // Act
      const result = await sut.getUser('1');

      // Assert
      expect(result).toEqual(expectedUser);
      expect(mockRepository.findById).toHaveBeenCalledWith('1');
    });

    it('should return null when user not found', async () => {
      // Arrange
      mockRepository.findById.mockResolvedValue(null);

      // Act
      const result = await sut.getUser('unknown');

      // Assert
      expect(result).toBeNull();
    });
  });
});

Mocking Strategies

// Mock modules
jest.mock('./database', () => ({
  getConnection: jest.fn().mockResolvedValue(mockConnection),
}));

// Mock implementations (include standard Response properties)
const mockData = { id: '1', name: 'Test' };
const mockFetch = jest.fn().mockImplementation((url: string) =>
  Promise.resolve({ ok: true, status: 200, json: () => Promise.resolve(mockData) })
);

// Spy on methods
const spy = jest.spyOn(service, 'validate');
expect(spy).toHaveBeenCalledTimes(1);

Read the full file on GitHub · 194 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. 4d ago First seen · 194 lines · 31 tokens per session scan A 4e8f1cafcdd3

Subscribe to this mod's changes

typescript-testing is a skill published in the GitHub repository DmitriyYukhanov/claude-plugins (7 stars, last pushed yesterday), licensed MIT. It adds 31 tokens to every session and 1,250 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-08-31.

Related

Other skills, from other repositories

design-everyday-things

Apply foundational design principles: affordances, signifiers, constraints, feedback, and conceptual models. Use when the user mentions "why is this confusing", "affordance", "error prevention", "discoverability", "human-centered design", "mental model", "mapping", "seven stages of action", "users keep making…

wondelai/skills · 132 tokens

create-app

Guided journey from a raw app idea to a validated, cleanly architected first version that ships on a sustainable cadence. Orchestrates ten skills phase by phase - lean-startup, design-sprint, clean-architecture, domain-driven-design, clean-code, pragmatic-programmer, system-design, ios-hig-design, 37signals-way…

wondelai/skills · 217 tokens

create-business

Guided journey from raw idea to a validated, positioned, priced business with a chosen beachhead. Orchestrates ten skills phase by phase - jobs-to-be-done, mom-test, design-sprint, lean-startup, good-strategy-bad-strategy, blue-ocean-strategy, obviously-awesome, hundred-million-offers, monetizing-innovation…

wondelai/skills · 211 tokens

clean-architecture

Structure software around the Dependency Rule: source code dependencies point inward from frameworks to use cases to entities. Use when the user mentions "architecture layers", "dependency rule", "ports and adapters (hexagonal)", "onion architecture", "screaming architecture", "where should business logic go"…

wondelai/skills · 147 tokens

cold-start-problem

Start and scale networked products using Andrew Chen's "The Cold Start Problem" framework for network effects. Use when the user mentions "network effects", "chicken and egg", "cold start", "two-sided marketplace", "atomic network", "hard side", "liquidity", "critical mass", "invite-only launch", "how do I get my…

wondelai/skills · 168 tokens

influence-psychology

Apply the seven principles of ethical persuasion (reciprocity, commitment, social proof, authority, liking, scarcity, unity) to product design, copy, and sales. Use when the user mentions "social proof", "persuasive copy", "why users dont convert", "ethical persuasion", "reciprocity", "scarcity tactics", "commitment…

wondelai/skills · 156 tokens