docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10
{
"context": "Evaluates whether the solution uses nock to record live HTTP traffic into fixture definitions and replay them according to the spec's recording/playback lifecycle. Checks correct recorder options, fixture persistence, playback setup, passthrough handling, and cleanup.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Recorder setup",
"description": "startRecording calls nock.recorder.rec with output_objects:true and dont_print:true, and toggles enable_reqheaders_recording only when includeHeaders is true.",
"max_score": 20
},
{
"name": "Header capture",
"description": "Recorded definitions include request headers when includeHeaders is requested, reflecting nock.recorder output with enable_reqheaders_recording enabled.",
"max_score": 15
},
{
"name": "Stop and cleanup",
"description": "stopRecording stops nock.recorder via recorder.stop/play, clears or restores the recorder state, and returns the definitions collected by nock.recorder.play().",
"max_score": 15
},
{
"name": "Fixture write",
"description": "Definitions from nock.recorder.play() are persisted to options.outputFile as a JSON array without extra console output.",
"max_score": 10
},
{
"name": "Playback definitions",
"description": "usePlayback loads fixture definitions (e.g., nock.load or nock.define) to create interceptors that replay recorded responses without hitting the network.",
"max_score": 20
},
{
"name": "Passthrough option",
"description": "When allowUnmocked is true, playback scopes enable allowUnmocked so unmatched requests fall through while recorded definitions still replay.",
"max_score": 10
},
{
"name": "Reset lifecycle",
"description": "resetPlayback restores network hooks and clears interceptors using nock.restore()/activate() and nock.cleanAll(), removing playback state for subsequent tests.",
"max_score": 10
}
]
}