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.
npx skills add manutej/luxor-claude-marketplace --skill jest-react-testing -a claude-codeWhat 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-code2Manually: put the files in place
~/.claude/skills/jest-react-testing/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/jest-react-testing/
1Skills CLI (Vercel)
npx skills add manutej/luxor-claude-marketplace --skill jest-react-testing -a codex2Manually: put the files in place
.agents/skills/jest-react-testing/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add manutej/luxor-claude-marketplace --skill jest-react-testing -a cursor2Manually: put the files in place
.cursor/skills/jest-react-testing/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install manutej/luxor-claude-marketplace jest-react-testing2Manually: put the files in place
.github/skills/jest-react-testing/SKILL.md1Skills CLI (Vercel)
npx skills add manutej/luxor-claude-marketplace --skill jest-react-testing -a gemini-cli2Platform CLI
gemini skills install https://github.com/manutej/luxor-claude-marketplace --path plugins/luxor-frontend-essentials/skills/jest-react-testingManually: put the files in place
.devin/skills/jest-react-testing/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add manutej/luxor-claude-marketplace --skill jest-react-testing -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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.