mcpField
W
w-unit

w-unit

github.com/blockmaticTesting & quality1647 installsUpdated 4w ago
Repository

About w-unit

w-unit is a repository skill for writing unit tests around requested behavior, following local test conventions and existing tools. It prioritizes meaningful failure cases over coverage targets and defines a focused-to-package test sequence.

Key features

  1. 01Follow neighboring tests and conventions
  2. 02Cover APIs, errors, and regressions
  3. 03Mock only documented boundaries
  4. 04Run focused and package tests
  5. 05Document behavior or command changes

Use cases

  1. 01Adding tests for a requested change
  2. 02Checking error paths and regressions

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/blockmatic/basilic-skills --skill w-unit

After installing, type/w-unitin Claude Code to confirm it loaded.

Details

From the project README

Cover the requested behavior with unit tests. Follow vitest-v5 (or the stack's test skill) and existing file conventions. Do not chase coverage percentage.

  1. Read neighboring tests and the test skill. Colocate *.test.ts beside the implementation.
  2. Test the behavior that can fail: public API, error paths, and the regression this change needs.
  3. Mock only at documented boundaries. Prefer real types and factories the repo already uses.
  4. Run the focused file, then the package test script.
  5. Docs: /w-docs if behavior or commands changed.

Comments

Markdown supported