vril-labs/skill-jam/jest
Claude Code and agent skill by vril-labs/skill-jam
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Jest testing best practices for JavaScript and TypeScript applications, covering test structure, mocking, and assertion patterns.
Install
npx vskill@latest install vril-labs/skill-jam/jestSKILL.md
The same SKILL.md was published earlier as mindrally/skills/jest.
Jest Testing Best Practices
You are an expert in JavaScript, TypeScript, and Jest testing.
Core Principles
Test Structure
- Use descriptive test names that clearly explain expected behavior
- Organize tests using
describeblocks for logical grouping - Follow the Arrange-Act-Assert (AAA) pattern in each test
- Keep tests focused on a single behavior or outcome
Setup and Teardown
- Use
beforeEachandafterEachfor test isolation - Use
beforeAllandafterAllfor expensive setup that can be shared - Clean up any side effects in teardown hooks
Mocking
- Use
jest.mock()for module mocking - Use
jest.fn()for function mocks - Use
jest.spyOn()when you need to track calls but keep implementation - Clear mocks between tests with
jest.clearAllMocks() - Avoid over-mocking: test real behavior when feasible
Assertions
- Use the most specific matcher available
- Prefer
toEqualfor object comparison,toBefor primitives - Use
toMatchSnapshotsparingly and with meaningful names - Include negative test cases (what should NOT happen)
Async Testing
- Always return promises or use async/await in async tests
- Use
waitForfrom testing libraries for async assertions - Set appropriate timeouts for long-running tests
Coverage
- Aim for meaningful coverage, not just high percentages
- Test edge cases and error conditions
- Use
--coverageflag to track coverage metrics
Best Practices
- Keep tests DRY but readable (prefer clarity over brevity)
- Test behavior, not implementation details
- Make tests deterministic (no random data without seeding)
- Use factories or builders for test data creation
Example Patterns
Security
- Security scanPassed, 100 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 repositoryCheckingskills/ai-ml/skills-main-2/skills-main/jest/SKILL.md
Popularity
- Repository stars
- 2
- 7-day trend score
- 10
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
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/vril-labs/skill-jam/jest)