Unit Test Stub Generator (Jest, Vitest, pytest from Function Signatures)

Generate test skeletons for your functions, with edge-case inputs derived from their signatures.

Use the tool

Why this tool exists

Writing the first test file is the boring part. This generator parses function declarations (function, async, arrow functions in JS and TS; def and async def in Python), builds a describe/it block or pytest test per function, derives edge-case arguments from parameter names, annotations and defaults (empty and Unicode strings, zero and negative numbers, empty lists, null) and adds a throws test when it sees a throw or raise.

It is a signature parser, not an AI: you still write the arrange and assert steps, which is where the thinking is. Parsing is regex-based, so complex generics, decorators and nested functions may need manual touch-ups. Your code stays in your browser.

How to use it

  1. Paste the source code.
  2. Choose Jest, Vitest or pytest and the module path.
  3. Fill in the TODO assertions.

Frequently asked questions

Is this AI-generated?

No, it is deterministic parsing and templates.

Which languages?

JavaScript, TypeScript and Python.

Does it run the tests?

No, it only writes stubs.