CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-tmp-promise

The tmp package with promises support and disposers.

93

1.78x
Overview
Eval results
Files

rubric.jsonevals/scenario-7/

{
  "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-promise

tile.json