generating-unit-tests
Installation
SKILL.md
Unit Test Generator
Overview
Automatically generate comprehensive unit tests from source code analysis covering happy paths, edge cases, boundary conditions, and error handling. Supports Jest, Vitest, Mocha (JavaScript/TypeScript), pytest (Python), JUnit 5 (Java), and Go testing with testify.
Prerequisites
- Testing framework installed and configured (
jest,vitest,pytest,junit-jupiter, or Gotesting) - Source code with clear function signatures, type annotations, or JSDoc comments
- Test directory structure established (
__tests__/,tests/,spec/, or*_test.go) - Mocking library available (
jest.mock,unittest.mock,Mockito, orgomock) - Package scripts configured to run tests (
npm test,pytest,go test)