(mochaDone)
| 67 | // pair on localhost. Consolidate them if possible. Otherwise remove this |
| 68 | // comment. |
| 69 | function 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 | |
| 94 | describe('Nock Back', () => { |
| 95 | beforeEach(() => { |
no test coverage detected
searching dependent graphs…