typescript-testing

typescript-testing is a skill for Claude Code 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 Code

Written for Claude Code: shipped in a Claude Code plugin.

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

Good fit Use it to write unit and integration tests, mock dependencies, test browser flows with Cypress or Playwright, and measure coverage.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dmitriyyukhanov/claude-plugins/typescript-testing
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 DmitriyYukhanov/claude-plugins --skill typescript-testing
Clone the repo
git clone --depth 1 https://github.com/DmitriyYukhanov/claude-plugins

Made for: Claude Code.

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/github.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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for typescript-testing

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00031 $0.01250
Opus 5.5 $0.00012 $0.00500
Sonnet 5.5 $0.00006 $0.00250
Haiku 4.5 $0.00003 $0.00125

Measured 1mo ago against content hash 4e8f1cafcdd3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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. 1mo 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 (8 stars, last pushed 8d ago), licensed MIT. It adds 31 tokens to every session and 1,250 once invoked, about $0.0001 per session on Opus 5.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.