Testing Library patterns for React component testing — queries, user events,
99
99%
Does it follow best practices?
Impact
100%
1.03xAverage score across 8 eval scenarios
Passed
No known issues
{
"context": "Tests whether the agent creates a custom render wrapper in test-utils.tsx that wraps components with all necessary providers, re-exports everything from @testing-library/react, and imports render and screen from the test-utils file in test files instead of from @testing-library/react directly.",
"type": "weighted_checklist",
"checklist": [
{
"name": "test-utils.tsx created",
"description": "A file named test-utils.tsx (or test-utils.ts) exists in the project",
"max_score": 8
},
{
"name": "customRender wraps with providers",
"description": "test-utils.tsx defines a custom render function that passes a wrapper option to the underlying @testing-library/react render, wrapping the component in at least two providers",
"max_score": 14
},
{
"name": "Re-exports from @testing-library/react",
"description": "test-utils.tsx contains `export * from '@testing-library/react'` (or equivalent re-export) so consumers get screen, waitFor, etc. from the same module",
"max_score": 12
},
{
"name": "customRender exported as render",
"description": "test-utils.tsx exports the custom render function with the name `render` (e.g. `export { customRender as render }` or `export function render`)",
"max_score": 10
},
{
"name": "Test imports from test-utils",
"description": "The test file imports render and/or screen from '../test-utils' (or the equivalent relative path), NOT from '@testing-library/react'",
"max_score": 14
},
{
"name": "No direct @testing-library/react render import in test",
"description": "The test file does NOT import render directly from '@testing-library/react'",
"max_score": 10
},
{
"name": "AllProviders wrapper component",
"description": "test-utils.tsx defines a wrapper component (e.g. AllProviders) that renders children inside all required providers",
"max_score": 10
},
{
"name": "getByRole used in tests",
"description": "The test file uses at least one getByRole query to find elements",
"max_score": 8
},
{
"name": "Regex name matchers in tests",
"description": "At least one query in the test file uses a regex (e.g. /username/i) rather than an exact string for text matching",
"max_score": 8
},
{
"name": "No implementation detail assertions",
"description": "Test assertions do NOT inspect component state, props, or CSS class names — only asserts on visible DOM output",
"max_score": 6
}
]
}evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
skills
testing-library-patterns
verifiers