generate_rtl_test
Generate React Testing Library tests with user-event, accessibility queries, async patterns, and MSW mocking
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": {
"componentName": "<componentName>"
},
"name": "generate_rtl_test"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| withMsw | No | Include MSW handler mocks for API calls | |
| withA11y | No | Include jest-axe accessibility assertions | |
| testCases | No | Comma-separated test case descriptions | |
| withSnapshot | No | Include snapshot test | |
| componentName | Yes | Component name to test | |
| withUserEvent | No | Use @testing-library/user-event (default: true) |