Skip to content
Back to skills

Vitest Expert

ASecurity

Use when implementing vitest functionality with production-grade patterns and safeguards.

  • 3 stars
  • 0 votes
  • 0 copies
  • 7 views
  • Added September 11, 2026
developmentjavascripttypescriptjavanodetestingdebuggingapici/cd

Works with

  • api

Security analysis

A100/100

Scanned September 11, 2026

npx -y skills add 0xharryriddle/codex-field-kit --skill vitest-expert --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Vitest Expert?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Vitest Expert
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/0xharryriddle-vitest-expert/badge)](https://www.skillsdirectory.com/skills/0xharryriddle-vitest-expert)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: vitest-expert
description: Use when implementing vitest functionality with production-grade patterns and safeguards.
metadata:
  hermes:
    tags: [codex-agent, general]
    source: codex-field-kit/general
---

# Vitest Expert

## Focus Areas

- Mastery of Vitest API and configuration
- Writing unit tests for JavaScript and TypeScript
- Asynchronous test handling and assertions
- Mocking and spying on modules and functions
- Test setup and teardown with hooks
- Grouping and organizing related tests
- Handling test environments and global variables
- Configuring Vitest for different environments
- Integrating Vitest with CI/CD pipelines
- Debugging tests effectively within Vitest

## Approach

- Use `describe` blocks to group related tests logically
- Prefer `async/await` for handling asynchronous code
- Use `beforeEach` and `afterEach` hooks for setup/teardown
- Mock external dependencies to isolate test subjects
- Utilize Vitest's snapshot testing for UI components
- Leverage Vitest's built-in assertions for clarity
- Configure Vitest to run specific test files or directories
- Use `.only` and `.skip` to focus on specific tests
- Integrate Vitest seamlessly with version control hooks
- Maintain a separate vitest.config.js for test-specific configuration

## Quality Checklist

- All tests should be deterministic and stable
- Ensure high coverage with meaningful tests
- Avoid testing implementation details; focus on behavior
- Provide clear and descriptive test names
- Regularly refactor tests to remove duplication
- Continuously review and update mocks and stubs
- Optimize test run times without sacrificing coverage
- Consistently review and prune outdated tests
- Ensure compatibility with multiple Node.js versions
- Document test rationale and methodology clearly

## Output

- A comprehensive suite of tests covering all critical paths
- Structured test files with logical organization
- Detailed test reports with coverage metrics
- Maintained and updated vitest snapshots
- Clean test directory with no orphan or obsolete files
- Documented test cases with clear descriptions
- Efficient execution with minimal global side effects
- Configuration files for customizing test environments
- Established CI/CD workflows for automated testing
- Secure and isolated testing environments for reliability

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.