MCPcopy Create free account
hub / github.com/nodejs/node / tnock

Function tnock

deps/npm/test/fixtures/tnock.js:9–17  ·  view source on GitHub ↗
(t, host, opts)

Source from the content-addressed store, hash-verified

7
8module.exports = tnock
9function tnock (t, host, opts) {
10 nock.disableNetConnect()
11 const server = nock(host, opts)
12 t.teardown(function () {
13 nock.enableNetConnect()
14 server.done()
15 })
16 return server
17}

Callers 1

doctor.jsFile · 0.85

Calls 3

disableNetConnectMethod · 0.80
enableNetConnectMethod · 0.80
doneMethod · 0.45

Tested by

no test coverage detected