test-code-style

Enforces Vitest code style with Korean descriptions and intent-based assertions.

Updated Jun 12, 2026
One-click install
npx skills add https://github.com/stardustrain/markdownviewer --skill test-code-style
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-code-style
Source: https://github.com/stardustrain/markdownviewer/tree/main/.agents/skills/test-code-style
Command: npx skills add https://github.com/stardustrain/markdownviewer --skill test-code-style

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents inconsistent and low-quality test implementations by enforcing a shared testing style, coverage expectations, and assertion practices.

Core Features & Use Cases

  • Test Structure Guidance: Defines conventions for organizing test files, describe blocks, contexts, and parameterized cases.
  • Assertion Quality Rules: Ensures tests validate behavior and avoid tautological assertions that merely duplicate implementation details.
  • Use Case: Apply this Skill when adding Vitest specs, creating new test cases, or reviewing existing tests to maintain project-wide testing standards.

Quick Start

Use the test-code-style skill to create a Vitest test file for the exported functions in the target file following the required conventions.

Frequently Asked Questions about test-code-style

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write consistent Vitest test code for my project?

To write consistent Vitest test code, enforce structured test organization, Korean test descriptions, branch coverage goals, and intent-based assertions without unnecessary mocking to prevent low-quality implementations and maintain project-wide testing standards.

What is the best way to organize Vitest describe blocks and test cases?

The best way to organize Vitest test cases is by following structured test conventions that define how to arrange describe blocks, contexts, and parameterized cases. This structure ensures reliable test code and maintains consistency across automated test files.

How do I avoid tautological assertions in unit testing?

To avoid tautological assertions in unit testing, apply intent-based assertion rules that ensure tests validate actual behavior rather than duplicating implementation details. This prevents low-quality tests that merely mirror the source code logic.

Does this test code style guidance require specific coverage metrics for Vitest?

Yes, this test code style guidance requires setting branch coverage goals for Vitest specifications. Establishing these coverage expectations ensures automated tests reliably cover conditional logic paths within the target file's exported functions.

When should I not use mocking in my Vitest unit tests?

You should avoid mocking in Vitest unit tests when it is unnecessary, as this test style guidance promotes intent-based assertions without excessive mocks. Relying on actual behavior validation prevents tests from becoming tightly coupled to implementation details.

Can I use this approach to review existing test code quality?

Yes, you can use this approach to review existing test code quality by checking against established testing standards. It evaluates whether current automated tests follow structured organization, branch coverage goals, and intent-based assertion practices.