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 correctly handles async content in React Testing Library tests — using findBy* or waitFor for async assertions, verifying loading and error states, and using queryBy* when checking for absent elements.",
"type": "weighted_checklist",
"checklist": [
{
"name": "findBy* for async data",
"description": "Uses findBy* queries (e.g. findByRole, findByText) or waitFor to wait for async content to appear — does NOT assert on async content synchronously with getBy*",
"max_score": 15
},
{
"name": "Loading state assertion",
"description": "Asserts that a loading indicator (e.g. text matching /loading/i or a spinner role) is present before async data arrives",
"max_score": 10
},
{
"name": "Loading state gone after data",
"description": "After the async data appears, asserts that the loading indicator is NO LONGER in the document",
"max_score": 10
},
{
"name": "queryBy* for absent elements",
"description": "Uses queryBy* (not getBy*) when asserting that an element is NOT present in the DOM",
"max_score": 12
},
{
"name": "Error state tested",
"description": "Includes a test (or test case) for when the data fetch fails, verifying that an error message is shown to the user",
"max_score": 12
},
{
"name": "Error state uses findBy* or waitFor",
"description": "The error state assertion also uses findBy* or waitFor to wait for the error message, not a synchronous getBy*",
"max_score": 8
},
{
"name": "No implementation detail assertions",
"description": "Does NOT inspect internal component state (e.g. component.state.isLoading) — only asserts on visible/accessible DOM output",
"max_score": 10
},
{
"name": "No container.innerHTML",
"description": "Does NOT use container.innerHTML to assert on content — uses screen queries instead",
"max_score": 8
},
{
"name": "Accessible queries used",
"description": "At least one assertion uses getByRole or findByRole to query elements by their accessible role",
"max_score": 8
},
{
"name": "render and screen imports",
"description": "Imports render and screen from '@testing-library/react'",
"max_score": 7
}
]
}evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
skills
testing-library-patterns
verifiers