Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(intercept): Improve error message when
new ClientMessage()
is i…
…nvoked with no options (#1386) In Node, it’s valid to invoke `new ClientMessage()` with no options. However, in Nock, this causes a crash: Cannot read property 'proto' of undefined stack: | Object.normalizeRequestOptions (lib/common.js:12:27) interceptorsFor (lib/intercept.js:139:10) new OverriddenClientRequest (lib/intercept.js:263:26) Test.t (tests/test_request_overrider.js:20:8) Fixing that does not seem like a high priority, so this provides a better error message, while also removing related unreachable code.
- Loading branch information