CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-nock

HTTP server mocking and expectations library for Node.js testing environments

67

0.98x
Quality

Pending

Does it follow best practices?

Impact

67%

0.98x

Average score across 10 eval scenarios

SecuritybySnyk

Pending

The risk profile of this skill

Overview
Eval results
Files

criteria.jsonevals/scenario-6/

{
  "context": "Evaluates how well the solution uses nock to gate real network traffic, configure allowlists, and toggle interception hooks without losing mock definitions. Focuses entirely on correct use of nock's network control and activation APIs that support the spec's behaviors.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Blocks traffic",
      "description": "Uses nock.disableNetConnect() to prevent real HTTP/HTTPS requests when blocking is enabled, causing disallowed hosts to fail as specified.",
      "max_score": 30
    },
    {
      "name": "Allowlist matcher",
      "description": "Configures nock.enableNetConnect(...) with a host string, RegExp, or predicate so that only allowed hosts bypass the block while others remain rejected.",
      "max_score": 25
    },
    {
      "name": "Gate override",
      "description": "Provides an opt-in escape hatch (e.g., temporary allow-all) by pairing disableNetConnect with enableNetConnect to reopen real traffic on demand and reapply blocking afterward.",
      "max_score": 15
    },
    {
      "name": "Hook toggling",
      "description": "Relies on nock.restore() to unhook interception without clearing existing mocks and nock.activate() to reattach the hooks so those mocks resume handling requests.",
      "max_score": 20
    },
    {
      "name": "Active status",
      "description": "Reports hook state by calling nock.isActive() (or equivalent check) before and after deactivate/activate cycles, matching expected boolean transitions.",
      "max_score": 10
    }
  ]
}

tile.json