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's Nock Back API to manage HTTP fixtures for the record, lockdown, update, and wild modes defined in the spec. Emphasis is on correct use of nock.back configuration, mode switching, fixture storage, and cleanup while wrapping the provided request function.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Back setup",
"description": "Initializes Nock Back with the fixtures directory via nock.back.fixtures and sets the desired mode using nock.back.setMode(...) before executing the wrapped request function.",
"max_score": 20
},
{
"name": "Record mode",
"description": "In record mode, invokes nock.back(fixtureName + '.json', options) to capture real HTTP traffic from requestFn and ensures nockDone() is called to write the fixture file.",
"max_score": 20
},
{
"name": "Lockdown replay",
"description": "Uses nock.back.setMode('lockdown') with an existing fixture to replay responses and relies on nockBackContext.assertScopesFinished() or equivalent Nock Back behavior to fail on unexpected requests.",
"max_score": 20
},
{
"name": "Update overwrite",
"description": "Switches Nock Back into 'update' mode to re-record an existing fixture by re-running nock.back and overwriting the prior file rather than merging or skipping it.",
"max_score": 20
},
{
"name": "Wild passthrough",
"description": "Sets nock.back.setMode('wild') (or clears interception) so requests bypass fixtures entirely and no fixture file is read or written for wild runs.",
"max_score": 10
},
{
"name": "Cleanup",
"description": "Calls nockDone() after each nock.back session and restores interception state (e.g., nock.restore() or back.restore()) to avoid leaking mocks between runs.",
"max_score": 10
}
]
}