Test Forge

Module in, test file out — the untestable parts named, never papered over.

Back to SkillSafe
or drop it anywhere on this box — the filename fills the path field too

Give the source path and the test file gets its conventional name: unit tests sit alongside the source as <module>.test.<ext>.

How it works

Nothing to paste? — a duration helper with a load-bearing regex ordering and a rounding boundary that already bit once. Or , rendered from a saved reply with no run and no charge.

1

Paste or drop the module

As it sits in your repo. The surface scanner and the hazard detector run in your browser as you type — free, no sign-in, nothing sent anywhere. Dropping the file also fills in its path.

2

Say what you distrust

The bug that already shipped, the boundary you argue about in review. Each note becomes a named test; nothing the code does not show gets invented.

3

Read the gaps first

Before you take the tests, read the assumptions and the not-covered list. A test file that admits what it cannot pin down is worth more than one that claims everything.

4

Put it in the repo

Download a git apply-ready patch that writes the file next to its source, or copy a shell command that does the same. Then copy the command that runs it.

Questions

Which test frameworks does it write for?

Vitest and Jest. Pick one before you run; the generated file imports the matching API and uses that runner's fake-timer and mocking calls. If the reply comes back written for the other one, the result panel says so instead of letting you find out from a failing test run.

What can I do without signing in or spending anything?

The surface scanner, the determinism-hazard detector and the test-path helper all run in your browser: paste a module and you immediately see the exports it can find, the clock reads, randomness, timers, network and DOM touches that would make naive tests flaky, and the conventional name for the test file. You can also render a saved example result end to end with no run and no charge. Only generating a new test file costs credits.

Will it invent tests for functions that do not exist?

It is instructed not to, and the app checks. Tests cover only behaviour evident in the pasted code or stated in your notes, ambiguity is recorded as a written assumption rather than a silent guess, and after each run the app compares the test file against the exports its own scanner found and tells you about any it never mentions.

How does the test file get into my project?

Give the source path, for example src/lib/duration.ts, and the result carries the full destination src/lib/duration.test.ts. Download a unified diff and run git apply from the repo root, or copy a shell command that creates the directory and writes the file. A third button copies the exact npx vitest run or npx jest command for it.

What is the coverage confidence number?

An honest self-assessment, on every reply, of how much of the module's real behaviour the tests pin down — low when a module is full of side effects that cannot be observed from outside, with the reason stated. It comes with an explicit not-covered list, and both can be copied as a pull-request comment or written into a comment header at the top of the file.

What happens when I forge the same module twice?

Earlier runs are kept on your SkillSafe account rather than in one browser, so they survive a new machine. Running the same module again compares against the previous result: lines added and removed, which test cases are new, which are gone, and whether the coverage confidence moved.