v14 fails to match interceptor in jest
Author: sadamsCreated Nov 6, 2024Updated Sep 8, 2025
Labelsbug
Please avoid duplicates
- I checked all open bugs and none of them matched my problem.
Reproducible test case
https://github.com/sadams/nock-jest-bug
Nock Version
14.0.0-beta.15
Node Version
v20.18.0
TypeScript Version
No response
What happened?
When running nock in tests using jest and typescript, we found that some interceptors weren't matching (where they were in earlier versions of nock).
We specifically nock.disableNetConnect() in our tests and nock.cleanAll() after each test.
More details are in the README: https://github.com/sadams/nock-jest-bug
Would you be interested in contributing a fix?
- yes
Source: nock/nock