CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-xmlhttprequest

XMLHttpRequest for Node.js that emulates the browser XMLHttpRequest object

Overall
score

75%

Overview
Eval results
Files

rubric.jsonevals/scenario-8/

{
  "context": "Evaluates how well the solution leverages xmlhttprequest's event system to expose start, completion, and abort hooks for a GET request utility. Focus is on correct use of the package's listener registration, removal, dispatching, and abort behaviors to satisfy the spec's lifecycle requirements.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Start listeners",
      "description": "Registers multiple start-stage handlers on the same XMLHttpRequest instance using addEventListener (e.g., on 'loadstart' or equivalent) and ensures both fire before response processing begins.",
      "max_score": 25
    },
    {
      "name": "Listener removal",
      "description": "Uses XMLHttpRequest.removeEventListener to detach a previously registered handler before completion so it never runs while remaining handlers for that event still execute.",
      "max_score": 20
    },
    {
      "name": "Completion dispatch",
      "description": "Fires a custom completion notification by calling dispatchEvent on the XMLHttpRequest (or an Event built from it) to deliver status code and body length data to listeners registered via addEventListener.",
      "max_score": 25
    },
    {
      "name": "Abort handling",
      "description": "Invokes xhr.abort() and relies on abort listeners attached through addEventListener to run, while ensuring no completion dispatchEvent occurs after abort.",
      "max_score": 20
    },
    {
      "name": "Listener ordering",
      "description": "Maintains registration order when multiple handlers are attached to the same event by relying on the package's native addEventListener sequencing rather than custom dispatch logic.",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-xmlhttprequest

tile.json