Test automatically generate comprehensive unit tests from source code covering happy paths, edge cases, and error conditions.
NewMaintained
Automatic
◆QA & Test Engineering packtestingunit-tests
Last verified 8/30/2026
What it changes
Passed 12 of 24 test cases with the skill, and 12 of 24 without it.
Without skill50%
With skill50%
Checks it passed that the model alone missed
Identifies specific uncovered branches in the coverage report.
Recommends increasing the test timeout using jest.setTimeout().
Recommends adding an await keyword before asynchronous function calls.
and 1 more in the full report
3 fixed17 passed either way3 still failing2 broke
Pass-rate lift
0 pp
Tokens
+64%
Agent turns
0%
Response time
+0%
Model gemini-3.6-flashMeasured 8/30/2026v120 of 25 cases passed with skill · 24 comparable
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 3 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 3
Prompt
Our Jest async unit test is failing with a test timeout error when calling an asynchronous token refresh function. What are the recommended resolutions?
What was checked, without and with the skill
Checked
Without skill
With skill
Recommends adding an await keyword before asynchronous function calls.
Missed
Passed
Recommends increasing the test timeout using jest.setTimeout().
Missed
Passed
case-07 · gemini-3.6-flash · 8/30/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md111 lines4 filesincludes scripts
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 Go testing)
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, or gomock)
Package scripts configured to run tests (npm test, pytest, go test)
Instructions
Scan the codebase with Glob to locate source files that lack corresponding test files (e.g., src/utils/parser.ts without __tests__/parser.test.ts).
Read each untested source file and extract:
All exported functions and class methods with their signatures.
Parameter types, return types, and thrown exceptions.
External dependencies (imports from other modules, third-party libraries, I/O).
Pure vs. impure function classification.
For each function, generate test cases in these categories: