Reference tile for Themis, a Node.js and TypeScript unit test framework designed for AI coding agents. Covers unit-test authoring, Jest/Vitest migration, agent-readable failure output with repair hints, and first-class integrations for Claude Code, Cursor, and generic agents.
96
94%
Does it follow best practices?
Impact
97%
2.69xAverage score across 10 eval scenarios
Passed
No known issues
The analytics-core package is a TypeScript library that processes event streams. The library has several source modules that have never had automated tests. A new policy requires all modules to have at least baseline test coverage before the next release.
The team uses Themis and wants to take advantage of its test generation capabilities to bootstrap coverage for the src/ directory, rather than writing every test from scratch. An engineer has been asked to run the generation workflow and document what was produced.
After generation, the engineer should also add at least two hand-authored tests for the aggregator.ts module — one that validates aggregate behavior across a sequence of events (a workflow), and one that verifies the pure arithmetic of a single aggregation step.
generate-tests.sh that contains the commands to generate baseline tests for the src/ directory using the Themis CLI.aggregator.ts module (one for workflow behavior, one for a pure unit check). Place them in the location that Themis expects for authored tests.GENERATION_REPORT.md file describing what commands were run, where the generated tests would land, and what directories Themis uses for its artifacts versus committed test files.You do not need to actually run the generation. Produce the script and the hand-authored tests as output files.
The following files are provided as inputs. Extract them before beginning.
=============== FILE: src/aggregator.ts =============== export interface Event { type: string; value: number; timestamp: number; }
export interface AggregateResult { total: number; count: number; average: number; }
export function aggregateStep(current: AggregateResult, event: Event): AggregateResult { const total = current.total + event.value; const count = current.count + 1; return { total, count, average: total / count }; }
export function runPipeline(events: Event[]): AggregateResult { const initial: AggregateResult = { total: 0, count: 0, average: 0 }; return events.reduce(aggregateStep, initial); }
=============== FILE: package.json =============== { "name": "analytics-core", "version": "1.0.0", "scripts": { "test": "themis test" }, "devDependencies": { "themis": "latest", "typescript": "^5.0.0" } }
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10
rules
skills
themis