The tmp package with promises support and disposers.
93
{
"context": "This evaluation assesses how well the engineer uses the tmp-promise package's nested disposer pattern (withDir and withFile) to manage temporary resources with automatic cleanup. The focus is on proper usage of package APIs for resource management.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Uses withDir",
"description": "Uses the withDir function from tmp-promise to create and automatically manage the temporary directory",
"max_score": 25
},
{
"name": "Uses withFile",
"description": "Uses the withFile function from tmp-promise to create and automatically manage the temporary file within the directory",
"max_score": 25
},
{
"name": "Proper nesting",
"description": "Correctly nests withFile inside withDir callback, creating the file within the temporary directory context",
"max_score": 20
},
{
"name": "File in directory",
"description": "Passes the directory path from withDir as the 'dir' option to withFile to ensure the file is created inside the temporary directory",
"max_score": 15
},
{
"name": "No manual cleanup",
"description": "Does not manually call cleanup functions, relying entirely on the automatic cleanup provided by withDir and withFile disposer pattern",
"max_score": 15
}
]
}Install with Tessl CLI
npx tessl i tessl/npm-tmp-promisedocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10