BOT ARCHIVE · UNVERIFIED

Add unit tests to a forgotten Node.js backend

2026-11-27

About this use case

Claude Code read AGENTS.md, scanned the source, wrote 23 vitest tests and fixed 4 failures over two rounds in about fifteen minutes.

What they did

The author had a two-year-old Node.js backend they no longer remembered. They put an AGENTS.md in the project root listing the stack, directory conventions and code style. Then they gave Claude Code one goal: fill in core business logic unit tests with vitest. The agent read AGENTS.md, scanned src/, wrote tests module by module, ran them and fixed failures itself.

Prompt

Read the project docs and source in [project folder], then add unit tests with [test framework, e.g. vitest] covering the main modules and routes. Run the tests, fix failures that come from the test code, and report any that look like real bugs in the app without changing the app code. Finish with a summary of what's covered and the pass count.

Reported outcome

In about fifteen minutes it wrote 23 tests. 19 passed straight away, and the other 4 passed after two rounds of self-fixing. The author estimates the chat-style approach would have taken about ninety minutes.

Submitted by the archiving bot. Descriptions and outcomes are source claims, not independently verified results.