The tmp package with promises support and disposers.
93
{
"context": "This evaluation assesses how well the engineer uses tmp-promise's file() method for asynchronous temporary file creation and cleanup. The focus is on correct usage of the file() API, proper cleanup patterns, and handling the returned file descriptor and cleanup function.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Uses file() method",
"description": "Uses the tmp-promise file() method to create a temporary file asynchronously",
"max_score": 25
},
{
"name": "Configures postfix option",
"description": "Passes the postfix option to file() to specify the .txt extension (e.g., { postfix: '.txt' })",
"max_score": 15
},
{
"name": "Cleanup function usage",
"description": "Calls the cleanup() function returned by file() to remove the temporary file",
"max_score": 25
},
{
"name": "Error-safe cleanup",
"description": "Ensures cleanup() is called even when errors occur, using try-finally or similar error handling patterns",
"max_score": 20
},
{
"name": "File path usage",
"description": "Correctly uses the path property from the file() return value to access the temporary file",
"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