Skip to main content
skill CX Codex

jest-react-testing — Claude Code skill: React tests with Jest

A skill for testing React components and hooks with Jest and React Testing Library: config, mocks, async patterns.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add manutej/luxor-claude-marketplace --skill jest-react-testing -a claude-code
Open on GitHub

What jest-react-testing does

The skill gives the agent a working frame for React tests: how to configure Jest, which queries to reach for, how to mock modules and API calls. It ships example jest.config.js files for JavaScript and TypeScript, a src/setupTests.js with mocks for matchMedia and IntersectionObserver, and a query priority list running from getByRole down to getByTestId.

A second part covers testing philosophy: assert on what the user does, not on component internals. Tests then survive refactors but still catch behaviour changes. The agent gets templates for mocks, async operations, timers and promises.

One caveat: the examples assume jsdom, babel-jest or ts-jest and @testing-library/jest-dom. On a different runner, or with Enzyme-style tests, you will rewrite the templates yourself.

What it helps with

  • set up Jest for a React project from scratch
  • write a test for a button click interaction
  • mock an API call and assert on the async render
  • test a custom React hook
  • pick the right query instead of getByTestId

Example prompts for the agent

  • set up Jest and React Testing Library for this project
  • write a test for the form component covering submit and error state
  • test the useCounter hook with renderHook

How to install jest-react-testing

1Skills CLI (Vercel)

npx skills add manutej/luxor-claude-marketplace --skill jest-react-testing -a claude-code

2Manually: put the files in place

~/.claude/skills/jest-react-testing/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/jest-react-testing/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about jest-react-testing

How do I install jest-react-testing in Claude?

Run npx skills add manutej/luxor-claude-marketplace --skill jest-react-testing -a claude-code. The skill file then lands at ~/.claude/skills/jest-react-testing/SKILL.md.

What does jest-react-testing do?

It helps the agent write and configure React component and hook tests with Jest and React Testing Library: configuration, mocks, async scenarios, integration tests.

What dependencies does the skill need?

The templates assume jsdom, babel-jest or ts-jest and @testing-library/jest-dom. With another runner the examples do not apply as written.

Similar skills

Everything for Testing and QA →

From the same set31

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor