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 uses within() to scope queries when the page contains duplicate link names across navigation and footer sections, and when querying specific table rows for their action buttons. Also checks that accessible role-based queries are used throughout.",
"type": "weighted_checklist",
"checklist": [
{
"name": "within() import",
"description": "Imports within from '@testing-library/react'",
"max_score": 8
},
{
"name": "within() on nav",
"description": "Uses within(navElement) to scope at least one link query to the navigation section rather than using a screen-level query",
"max_score": 14
},
{
"name": "within() on footer",
"description": "Uses within(footerElement) to scope at least one link query to the footer section rather than using a screen-level query",
"max_score": 14
},
{
"name": "within() on table row",
"description": "Uses within(rowElement) to scope queries to a specific table row when finding action buttons",
"max_score": 12
},
{
"name": "No ambiguous screen queries for duplicates",
"description": "Does NOT use screen.getByRole('link', ...) or screen.getByText(...) directly for 'Home', 'About', 'Pricing', or 'Contact' links without within() scoping",
"max_score": 10
},
{
"name": "getByRole for navigation container",
"description": "Uses getByRole('navigation', ...) to find the nav or footer container before scoping with within()",
"max_score": 8
},
{
"name": "getByRole for links",
"description": "Uses getByRole('link', ...) inside within() calls to find individual links",
"max_score": 8
},
{
"name": "getByRole for buttons",
"description": "Uses getByRole('button', ...) inside within() calls to find Edit and Delete buttons in a specific row",
"max_score": 8
},
{
"name": "Regex name matchers",
"description": "At least two queries use a regex (e.g. /home/i) for the name option rather than an exact string",
"max_score": 8
},
{
"name": "No querySelector usage",
"description": "Does NOT use container.querySelector or document.querySelector anywhere in the test file",
"max_score": 10
}
]
}evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
skills
testing-library-patterns
verifiers