Skip to content

Latest commit

 

History

History
12 lines (10 loc) · 741 Bytes

HOW_IT_WORKS.md

File metadata and controls

12 lines (10 loc) · 741 Bytes

How it works

The Octokit Fixtures server is a simple express app which uses the http-proxy-middleware package to proxy requests to the mocked routes provided by @octokit/fixtures

Fixtures are loaded with nock. nock intercepts all requests by patching low-level Node APIs that send http requests. All mocks loaded with nock are stored globally, which can quickly lead to false positives due to mocks loaded earlier. To avoid that problem we dynamically change the scope for each loaded fixture, from something like api.github.com:443 to something like fixtures-id123.github.com:443.