or run

tessl search
Log in

Version

Files

tile.json

rubric.jsonevals/scenario-9/

{
  "context": "This criteria evaluates the engineer's ability to use metro-memory-fs's truncateSync API to resize files. The focus is on correctly applying the truncate operation with proper parameters and understanding its behavior for expanding and shrinking files.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses truncateSync",
      "description": "Implementation calls fs.truncateSync() to resize the file",
      "max_score": 40
    },
    {
      "name": "Correct parameters",
      "description": "Passes the correct file path and target size to truncateSync (fs.truncateSync(filePath, targetSize))",
      "max_score": 30
    },
    {
      "name": "Returns file size",
      "description": "Returns the new size of the file after truncation (can use statSync to get size)",
      "max_score": 20
    },
    {
      "name": "Error handling",
      "description": "Allows errors from truncateSync to propagate (e.g., ENOENT for missing files)",
      "max_score": 10
    }
  ]
}