docs
evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
{
"context": "Evaluates how well the solution leverages jsx-ast-utils to turn JSX prop attributes into JavaScript values for snapshot generation. Scoring checks proper reliance on getPropValue semantics for literals, expressions, spreads, JSX markup, and unsupported expressions.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Prop evaluation",
"description": "Uses jsx-ast-utils getPropValue to resolve requested JSX attributes instead of custom evaluators, returning the package-produced values for literals and expression containers.",
"max_score": 30
},
{
"name": "Boolean coercion",
"description": "Relies on getPropValue so boolean shorthand and string literals \"true\"/\"false\" surface as booleans, matching package coercion rules.",
"max_score": 20
},
{
"name": "JSX markup",
"description": "Uses getPropValue output for JSX elements or fragments so values become the package-rendered markup strings rather than raw AST nodes.",
"max_score": 15
},
{
"name": "Spread objects",
"description": "When spreads are object literals, synthesizes attributes and runs them through getPropValue (or getProp + getPropValue) while safely ignoring non-object spreads without throwing.",
"max_score": 20
},
{
"name": "Unsupported cases",
"description": "For unsupported expressions (e.g., functions, optional chains) returns null as produced by getPropValue instead of throwing or inventing fallback values.",
"max_score": 15
}
]
}