Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Generate unit test scaffolding and test suites for Jest, PyTest, Go testing, JUnit, RSpec with mocking, assertions, and coverage configuration
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 116% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 83% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 120% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 32% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 40% | 0% |
Trigger conditions:
Use when: You have code that needs test coverage with framework-specific patterns, mocking strategies, and coverage enforcement.
Required validations before proceeding:
NOW_ET using NIST/time.gov semantics (America/New_York, ISO-8601)framework is one of: Jest, PyTest, Go, JUnit, RSpectarget_code is either a valid file path or parseable descriptioncoverage_threshold is 0-100NOW_ET = 2025-10-26T02:31:24ZFast path for 80% of cases:
jest.config.js with basic settingspytest.ini with test discovery_test.go namingpom.xml or build.gradle snippet.rspec and spec_helper.rbToken budget: ≤2k tokens for code analysis + generation
Extended validation with dependency mocking:
jest.mock() or @jest/globalspytest-mock fixtures or unittest.mockallow() and expect() stubsNOW_ET)Token budget: ≤6k tokens (includes retrieval + generation)
Deep dive with property-based testing and fixtures:
fast-check integrationhypothesis strategiestesting/quick packagejqwik or QuickTheoriesrantly gemtest.each()@pytest.mark.parametrize@ParameterizedTesttests/evals_unit-testing-generator.yamlToken budget: ≤12k tokens (includes research, generation, evals)
Framework selection:
target_code has file extension → auto-detect: .js/.ts → Jest, .py → PyTest, .go → Go, .java → JUnit, .rb → RSpecframework inputMocking strategy thresholds:
Abort conditions:
target_code is unparseable or empty → emit TODO and stopRequired fields:
typescript{ test_files: [ { path: string, // e.g., "src/__tests__/service.test.js" content: string, // Full test file code framework: string // Jest|PyTest|Go|JUnit|RSpec } ], config: { file_name: string, // e.g., "jest.config.js" content: string, // Configuration code description: string // What this configures }, coverage_setup: { threshold: number, // 0-100 reporters: string[], // ["json", "lcov", "text"] exclude_patterns: string[] // Globs to ignore }, metadata: { generated_at: string, // ISO-8601 timestamp token_tier: "T1"|"T2"|"T3", sources_consulted: [ // Only for T2+ { title: string, url: string, accessed: string // NOW_ET } ] } }
Validation:
Input:
json{ "framework": "PyTest", "target_code": "class UserService:\n def get_user(self, id): return db.query(User).get(id)", "test_type": "unit", "coverage_threshold": 90 }
Output (T2 with mocking):
python# tests/test_user_service.py import pytest from unittest.mock import Mock, patch from myapp.services import UserService @pytest.fixture def mock_db(): return Mock() def test_get_user_success(mock_db): # Arrange user_service = UserService(db=mock_db) mock_db.query.return_value.get.return_value = {"id": 1, "name": "Alice"} # Act result = user_service.get_user(1) # Assert assert result["id"] == 1 mock_db.query.assert_called_once()
_(Full output would include pytest.ini config and coverage setup; truncated for ≤30 line limit)_
Token budgets (enforced):
Safety:
Auditability:
NOW_ET)Determinism:
Official Documentation (accessed 2025-10-26T02:31:24Z):
Mocking Libraries:
Property-Based Testing:
Coverage Tools:
Other measured skills in the registry, with their headline benchmark lift.