New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve debug logging #2731
Comments
Additionally, I don't know if it's related but it I have this issue in tests that have to deal with multiple hosts: const appApiMock = nock("http://localhost");
const externalHost = nock("https://oauthconfigapp.automationanywhere.digital") Is this supported? I see no mention of "multiple scopes" in the readme. I'm using |
Probably because you don't use the regex syntax: https://github.com/nock/nock?tab=readme-ov-file#specifying-path Regarding the debugging. Debug mode is verbose and includes internal details. Luckily, Nock's API is pretty straightforward and well-documented: |
Please avoid duplicates
Context
I'm trying to migrate from axios/axios-mock-adapter to fetch/nock and I'm having really hard time understanding why some requests are not being matched. I use
nock.disableNetConnect()
to ensure that all requests are "caught" but even with debugging enabled, I don't know what nock is doing:NOCK:COMMON 14419: options.host
? Is it a request being handled?interceptors for
mean? Is it an event? Is it matching? Is it supposed to be followed by a list of interceptors?falling back to original ClientRequest
? Why is it falling back? Why is mynock("https://oauthconfigapp.automationanywhere.digital").persist().post("/*").reply(200, {}).get("/*").reply(200, {})
not catching these requests?Alternatives
Improve the logging to clarify what's actually happening, for example:
If the feature request is accepted, would you be willing to submit a PR?
The text was updated successfully, but these errors were encountered: