PlugWiki

JavaScript TypeScript Jest Skill (awesome-copilot): Tests

Gives Claude a short set of Jest rules for writing JavaScript and TypeScript tests, for developers who want consistent, readable tests.

Installs
14.2K
on skills.sh
Stars
40.7K
on GitHub
Updated
Oct 2026
last repo commit

javascript-typescript-jest is a one-page rulebook for Jest tests. It covers how to name and place test files, how to mock dependencies, how to test async code, when to use snapshots, how to test React components and which matchers to reach for.

It triggers when you write or review JavaScript or TypeScript tests. It bundles one file and no scripts, so it only changes how Claude writes tests. It lists no command for running them.

Good for

  • JavaScript and TypeScript developers who test with Jest
  • Teams that want one test style across a repo
  • React developers moving from Enzyme to React Testing Library

Install javascript-typescript-jest

Claude Code

  1. 1

    Copy this prompt.

    Install the javascript-typescript-jest skill in Claude Code. Run this command:
    
    npx skills add https://github.com/github/awesome-copilot --skill javascript-typescript-jest
    
    Then check that it loaded and tell me how to use it.
  2. 2

    Paste it into Claude Code. It shows the change and asks before running it.

Requires Node.js.

From the vendor's docs. Source.

What's in the skill

When it loads

Best practices for writing JavaScript/TypeScript tests using Jest, including mocking strategies, test structure, and common patterns.

Sections in SKILL.md

  1. Test Structure
  2. Effective Mocking
  3. Testing Async Code
  4. Snapshot Testing
  5. Testing React Components
  6. Common Jest Matchers

Key facts

Installs on skills.sh
14,153 as of 2026-11-02
Last repo commit
2026-10-30

What it includes

  • .test.ts or .test.js files, nested describe, clear names

    Name files with a .test.ts or .test.js suffix, keep them next to the code or in __tests__, and follow the describe and it pattern with descriptive names.

    Try: “Write Jest tests for src/cart.ts using the javascript-typescript-jest skill.”

    Test structure

  • jest.mock, jest.spyOn and reset between tests

    Mock external dependencies such as APIs and databases, use mockImplementation or mockReturnValue for behavior, and call jest.resetAllMocks() in afterEach.

    Effective mocking

  • Return promises, resolves and rejects, set timeouts

    Always return promises or use async and await, use the resolves and rejects matchers, and set timeouts for slow tests with jest.setTimeout().

    Testing async code

  • Keep snapshots small and review changes

    Use them for UI components or complex objects that change rarely, and review snapshot changes before committing.

    Snapshot testing

  • React Testing Library and userEvent over Enzyme

    Test user behavior and accessibility, query by role, label or text, and prefer userEvent over fireEvent.

    Testing React components

  • Cheat sheet for basic, number, string, array and mock matchers

    Lists toBe, toEqual, truthiness, number comparisons, toMatch, toContain, toHaveLength, toHaveProperty, toThrow and mock-call matchers.

    Common matchers

From the official docs

Questions

What does the javascript-typescript-jest skill do?

It gives Claude Jest conventions: file naming, nested describe blocks, mocking with jest.mock and jest.spyOn, async testing, snapshots, React Testing Library and a matcher cheat sheet.

How do I install it?

Use the install box at the top of this page. The skill is a single SKILL.md file with nothing else to set up.

Does it run my tests?

The file is a style guide. It lists no command for running Jest, so Claude uses whatever your project already has, such as an npm test script.

Does it work with Vitest?

SKILL.md is written for Jest and names Jest functions throughout.

Should I use React Testing Library or Enzyme?

The skill says to use React Testing Library over Enzyme, and userEvent over fireEvent for more realistic interactions.

Is it safe?

The skill is a single SKILL.md and bundles no scripts. The awesome-copilot README says its content comes from third-party developers and asks you to inspect it before installing, so read the file first.

Information

updated Nov 2, 2026

Folder
skills/javascript-typescript-jest

github/awesome-copilotskills.sh

Sources

Docs, issue trackers and discussions this page is built from.

Show all 3
  1. javascript-typescript-jest SKILL.md · github.com
  2. commands.md · github.com
  3. github/awesome-copilot README · github.com

Updated Nov 2, 2026.