docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10
{
"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
}
]
}