MCPcopy
hub / github.com/nock/nock / nockBackWithFixtureLocalhost

Function nockBackWithFixtureLocalhost

tests/test_back.js:69–92  ·  view source on GitHub ↗
(mochaDone)

Source from the content-addressed store, hash-verified

67// pair on localhost. Consolidate them if possible. Otherwise remove this
68// comment.
69function nockBackWithFixtureLocalhost(mochaDone) {
70 nockBack('goodRequestLocalhost.json', function (nockDone) {
71 expect(this.scopes).to.be.empty()
72
73 startHttpServer(requestListener).then(server => {
74 const request = http.request(
75 {
76 host: 'localhost',
77 path: '/',
78 port: server.address().port,
79 },
80 response => {
81 expect(response.statusCode).to.equal(217)
82 this.assertScopesFinished()
83 nockDone()
84 mochaDone()
85 },
86 )
87
88 request.on('error', () => expect.fail())
89 request.end()
90 })
91 })
92}
93
94describe('Nock Back', () => {
95 beforeEach(() => {

Callers 1

test_back.jsFile · 0.85

Calls 4

startHttpServerFunction · 0.85
nockDoneFunction · 0.85
assertScopesFinishedMethod · 0.80
onMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…