generate_tests_for_coverage
Generate targeted test cases to achieve 80%+ coverage for a file, supporting Jest, Vitest, or Mocha. Include edge cases and accessibility tests for components to enhance code quality and reliability.
Instructions
Generate intelligent tests to achieve 80%+ coverage
Input Schema
Name | Required | Description | Default |
---|---|---|---|
coverageTarget | No | Target coverage percentage (default: 80) | |
includeAccessibility | No | Include accessibility tests for components | |
includeEdgeCases | No | Include edge case tests | |
targetFile | Yes | File to generate tests for | |
testFramework | No | Test framework to use |
Input Schema (JSON Schema)
{
"properties": {
"coverageTarget": {
"description": "Target coverage percentage (default: 80)",
"type": "number"
},
"includeAccessibility": {
"description": "Include accessibility tests for components",
"type": "boolean"
},
"includeEdgeCases": {
"description": "Include edge case tests",
"type": "boolean"
},
"targetFile": {
"description": "File to generate tests for",
"type": "string"
},
"testFramework": {
"description": "Test framework to use",
"enum": [
"jest",
"vitest",
"mocha"
],
"type": "string"
}
},
"required": [
"targetFile"
],
"type": "object"
}