Implement comprehensive testing strategies using Jest, Vitest, and Testing Library for unit tests, integration tests, and end-to-end testing with mocking, fixtures, and test-driven development. Use when writing JavaScript/TypeScript tests, setting up test infrastructure, or implementing TDD/BDD workflows.
76
71%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Passed
No known issues
Optimize this skill with Tessl
npx tessl skill review --optimize ./tests/ext_conformance/artifacts/agents-wshobson/javascript-typescript/skills/javascript-testing-patterns/SKILL.mdVitest config and module mocking
Globals enabled
100%
100%
Node environment
100%
100%
Coverage provider v8
100%
100%
Coverage reporters
62%
100%
Coverage excludes
0%
100%
Setup files
0%
0%
NPM test scripts
25%
100%
vi.mock factory pattern
0%
0%
vi.clearAllMocks in beforeEach
12%
62%
Async/await tests
100%
100%
Rejects assertion
100%
100%
Edge cases tested
100%
100%
Test fixtures and dependency injection
Faker package used
100%
100%
Factory with overrides
100%
100%
Array factory function
100%
100%
DI interface defined
100%
100%
Mock via constructor
100%
100%
vi.mocked() usage
0%
100%
Nested describe blocks
100%
100%
beforeEach fresh instance
100%
100%
Descriptive test names
100%
100%
Error path tests
100%
100%
TypeScript types in tests
100%
100%
React Testing Library and timer mocking
Testing Library imports
100%
100%
Semantic queries used
100%
100%
No data-testid overuse
100%
100%
renderHook usage
100%
100%
act() wrapping
25%
25%
Snapshot testing
0%
0%
vi.useFakeTimers called
100%
100%
vi.advanceTimersByTime used
100%
100%
vi.useRealTimers restored
100%
100%
vi.spyOn method spy
0%
0%
mockRestore in afterEach
0%
0%
47823e3
Table of Contents
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.