generate_tests
Generate test cases from a function signature, covering happy path, edge cases, error cases, and boundary values as Jest or Vitest tests.
Instructions
Generate test cases from a function signature. Produces happy path, edge cases, error cases, and boundary value tests as Jest/Vitest test code.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"signature": "<signature>"
},
"name": "generate_tests"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| framework | No | Test framework to generate for (default: vitest) | |
| signature | Yes | The function signature to generate tests for, e.g. "export async function fetchUser(id: number): Promise<User>" | |
| module_path | No | Import path for the module under test (default: "./module") |