manage-entity-tests

Generate Vitest test scaffolds for TypeScript classes implementing interfaces.

4|Updated Sep 24, 2025
One-click install
npx skills add https://github.com/talbenmoshe/zdr-tools --skill manage-entity-tests
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: manage-entity-tests
Source: https://github.com/talbenmoshe/zdr-tools/tree/main/.claude/skills/manage-entity-tests
Command: npx skills add https://github.com/talbenmoshe/zdr-tools --skill manage-entity-tests

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps teams quickly generate a complete Vitest-based test scaffold for TypeScript classes that implement interfaces, reducing boilerplate and ensuring consistent test structure.

Core Features & Use Cases

  • Generates a tests folder with a camelCase spec file per class (e.g., myClass.spec.ts)
  • Provides a createMyClass helper to inject fake dependencies via /fakes builders
  • Creates describe blocks per interface method and tests different scenarios following the pattern

Quick Start

Use this skill to generate a test file for a TypeScript class that implements an interface, e.g., "Create tests for MyClass".

Frequently Asked Questions about manage-entity-tests

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

FAQPage Schema
How do I auto-generate Vitest tests for TypeScript classes?

To auto-generate Vitest tests for TypeScript classes, you can use this skill to scaffold a __tests__ folder with a spec file, a createMyClass helper, and fake dependency builders.

What is the interface-driven testing pattern in Vitest?

The interface-driven testing pattern in Vitest creates describe blocks for each interface method and injects fake dependencies through dedicated builders to isolate class behavior during tests.

Does this TypeScript test generation require a specific folder structure?

Yes, this TypeScript test generation requires a specific folder structure. It enforces placing spec files inside a __tests__ directory and expects a createMyClass helper for dependency injection.

How do I set up fake builders for dependency injection in Vitest?

You set up fake builders for dependency injection in Vitest by using the generated createMyClass helper, which allows you to pass mocked dependencies into your TypeScript class tests.

Can I use this to generate tests for TypeScript classes without interfaces?

No, you cannot effectively use this for TypeScript classes without interfaces. The skill specifically automates test creation for classes that implement interfaces to ensure a consistent testing pattern.