As I mentioned at #1515 (comment), Got automatically retries failed requests twice.
That means if you have a test which mocks a 4xx or 5xx response, got will immediately reissue it.
At that point, the mock will have been consumed. The test will error out with Nock: No match for request.
Adding { retry: 0 } to the got calls will disable this behavior, and will make the tests behave less confusingly.
As I also mentioned in that thread:
While automatic retrying may be nice in certain cases, it is unsuited to testing. I am not convinced it is a good default.
We should use got.extend() to set defaults that turn off this behavior.