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 effectively an engineer uses the promise.allsettled package to handle custom Promise subclasses. The focus is on correct usage of the package's Promise Subclass Support capability, including proper integration, handling of mixed promise types, and preservation of subclass behavior.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Package Import",
"description": "Correctly imports the promise.allsettled package using require() or import, such as `const allSettled = require('promise.allsettled')` or using the shim/polyfill approach",
"max_score": 15
},
{
"name": "Core Function Usage",
"description": "Uses the promise.allsettled function (or Promise.allSettled after shimming) to process the array of promises rather than implementing custom settlement tracking logic",
"max_score": 30
},
{
"name": "Subclass Preservation",
"description": "Correctly passes custom Promise subclass instances to the allSettled function, allowing the package to preserve subclass behavior and constructor semantics (e.g., by using allSettled.call() with the appropriate this context or by directly passing subclass instances)",
"max_score": 25
},
{
"name": "Result Handling",
"description": "Returns the result from promise.allsettled directly or properly transforms it to match the required format, ensuring status ('fulfilled' or 'rejected') and corresponding value/reason properties are present",
"max_score": 20
},
{
"name": "Edge Case Handling",
"description": "Correctly handles edge cases (empty arrays, mixed standard/custom promises) by relying on the package's built-in behavior rather than adding unnecessary custom validation",
"max_score": 10
}
]
}