docs
evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
{
"context": "This criteria evaluates how well the engineer uses the cjs-module-lexer package to detect exports defined via Object.defineProperty. The focus is on correct usage of the parse() function and proper interpretation of its output to identify defineProperty-based exports.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Import parse function",
"description": "Correctly imports the parse() function from the cjs-module-lexer package using require('cjs-module-lexer').parse or destructuring syntax",
"max_score": 10
},
{
"name": "Call parse function",
"description": "Calls parse() with the source code string as the first argument to analyze the CommonJS module",
"max_score": 20
},
{
"name": "Extract exports array",
"description": "Accesses the exports property from the parse() function's return value to get the array of detected export names",
"max_score": 25
},
{
"name": "Value property detection",
"description": "The implementation correctly detects exports defined using Object.defineProperty with a value property (as verified by the test case with { value: 42, enumerable: true })",
"max_score": 15
},
{
"name": "Getter property detection",
"description": "The implementation correctly detects exports defined using Object.defineProperty with a get function (as verified by the test case with get: function() { return bar; })",
"max_score": 15
},
{
"name": "Multiple exports handling",
"description": "The implementation correctly handles source code with multiple Object.defineProperty calls and returns all detected export names",
"max_score": 15
}
]
}