add-unit-tests

Write missing unit tests for makeup-js modules using BDD and vi conventions.

47|14|Updated Jan 8, 2020
One-click install
npx skills add https://github.com/makeup/makeup-js --skill add-unit-tests-makeup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-unit-tests
Source: https://github.com/makeup/makeup-js/tree/main/.claude/skills/add-unit-tests
Command: npx skills add https://github.com/makeup/makeup-js --skill add-unit-tests-makeup

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

makeup-js modules often have incomplete unit test coverage, leaving untested code branches, edge cases, and guard clauses that can hide bugs. Manually identifying these gaps and writing tests that match the project's existing conventions is time-consuming and error-prone.

Core Features & Use Cases

  • Automated Gap Identification: Analyzes module source code and existing tests to pinpoint uncovered branches, functions, edge cases, and negative input guards, either via a provided coverage report or by running the project's coverage tooling.
  • Convention-Matched Test Writing: Generates new tests that exactly follow the project's BDD structure, vi mocking patterns, and file formatting, without modifying existing test files.
  • Use Case: A developer working on the makeup-roving-tabindex module can use this skill to quickly write tests for uncovered edge cases like empty input lists or invalid keyboard events, ensuring full coverage without manual review of the entire test suite.

Quick Start

Use the add-unit-tests skill to write missing unit tests for the makeup-keyboard-trap module to close its test coverage gaps.

Frequently Asked Questions about add-unit-tests

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

FAQPage Schema
How do I write unit tests for uncovered branches in JavaScript modules?

To write unit tests for uncovered branches in JavaScript modules, you can automate gap identification by analyzing source code against existing test suites to pinpoint missing coverage and generate convention-matched tests for edge cases.

How does automated test coverage gap analysis work for existing BDD test suites?

Automated test coverage gap analysis works by comparing module source code against existing test suites to pinpoint uncovered branches, functions, and negative input guards, either via a provided coverage report or by running the project's coverage tooling.

Can I automatically generate unit tests that match my project's existing vi mocking conventions?

Yes, you can automatically generate unit tests that match your project's existing vi mocking conventions by ensuring the new tests adhere to the established BDD structure, mocking patterns, and file formatting without modifying existing test files.

What is the best way to add unit tests for edge cases and negative input guards in JavaScript modules?

The best way to add unit tests for edge cases and negative input guards in JavaScript modules is to use automated gap identification to target uncovered code paths and generate BDD-structured tests that verify pass rates and updated coverage metrics.

Does automated test generation modify existing test files when filling coverage gaps?

No, automated test generation does not modify existing test files when filling coverage gaps; it solely generates new tests that follow the project's BDD structure and file formatting to verify pass rates and updated coverage metrics.

Why does my JavaScript test suite still report missing coverage after adding standard unit tests?

Your JavaScript test suite may report missing coverage because standard tests often miss edge cases, uncovered branches, and negative input guards; identifying these specific gaps ensures new tests target the exact untested code paths.