neversight/learn-skills.dev/jest-skill
Claude Code and agent skill by neversight/learn-skills.dev
- community
- ext:[{"type":"context","description":"Custom context provider definitions"}]
Checking that the SKILL.md file is still in the repository.
Generates Jest unit and integration tests in JavaScript or TypeScript. Covers mocking, snapshots, async testing, and React component testing. Use when user mentions "Jest", "describe/it/expect", "jest.mock", "toMatchSnapshot". Triggers on: "Jest", "expect().toBe()", "jest.mock", "snapshot test", "JS test", "React test".
Install
npx vskill@latest install neversight/learn-skills.dev/jest-skillSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as neversight/learn-skills.dev/jest-skill.
Jest Testing Skill
Core Patterns
Basic Test
Matchers
Mocking
Async Testing
React Component Testing (Testing Library)
Snapshot Testing
Anti-Patterns
| Bad | Good | Why | |
|---|---|---|---|
expect(x === y).toBe(true) | expect(x).toBe(y) | Better errors | |
No await on async | Always await | Swallows failures | |
| Snapshot everything | Snapshot UI, assert logic | Snapshot fatigue |
Quick Reference
| Task | Command | |
|---|---|---|
| Run all | npx jest | |
| Watch | npx jest --watch | |
| Coverage | npx jest --coverage | |
| Update snapshots | npx jest --updateSnapshot | |
| Run file | npx jest tests/calc.test.js | |
| Single test | test.only('name', () => {}) |
Deep Patterns
For production-grade patterns, see reference/playbook.md:
| Section | What's Inside | |
|---|---|---|
| §1 Production Config | Node + React configs, path aliases, coverage thresholds | |
| §2 Mocking Deep Dive | Module/partial/manual mocks, spies, timers, env vars | |
| §3 Async Patterns | Promises, rejections, event emitters, streams | |
| §4 test.each | Array, tagged template, describe.each for table-driven tests | |
| §5 Custom Matchers | toBeWithinRange, toBeValidEmail, TypeScript declarations | |
| §6 React Testing Library | userEvent, hooks, context providers | |
| §7 Snapshot Testing | Component, inline, property matchers | |
| §8 API Service Testing | Mocked axios, CRUD patterns, error handling | |
| §9 Global Setup | Multi-project config, DB setup/teardown | |
| §10 CI/CD | GitHub Actions with coverage gates | |
| §11 Debugging Table | 10 common problems with fixes | |
| §12 Best Practices | 15-item production checklist |
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingdata/skills-md/lambdatest/agent-skills/jest-skill/SKILL.md
Popularity
- Repository stars
- 218
- Repository forks
- 38
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
contextCustom context provider definitions
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/neversight/learn-skills.dev/jest-skill)