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
bug(overrider): unmocked HTTPS request with partial interceptor match #1664
Conversation
Fixes: nock#1422 The `allowUnmocked` option is processed in two places. Once in the intercept when there are no interceptors that come close to matching the request. And again in the overrider when there are interceptors that partially match, eg just path, but don't completely match. This fixes and explicitly tests the later case in the overrider by making an HTTPS request for a path that has an interceptor but fails to match the query constraint.
fyi @NatalieWolfe |
@paulmelnikow @gr2m can this get in before 11 publishes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, had a review started on this but looks like I didn't click the button.
Thanks for fixing this!
@@ -109,3 +109,38 @@ test('allow unmocked option works with https', t => { | |||
.end() | |||
}) | |||
}) | |||
|
|||
test('allow unmocked option works with https for a partial match', t => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a link here to the issue?
🎉 This PR is included in version 11.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
…#1664) Fixes: #1422 The `allowUnmocked` option is processed in two places. Once in the intercept when there are no interceptors that come close to matching the request. And again in the overrider when there are interceptors that partially match, eg just path, but don't completely match. This fixes and explicitly tests the later case in the overrider by making an HTTPS request for a path that has an interceptor but fails to match the query constraint.
…#1664) Fixes: #1422 The `allowUnmocked` option is processed in two places. Once in the intercept when there are no interceptors that come close to matching the request. And again in the overrider when there are interceptors that partially match, eg just path, but don't completely match. This fixes and explicitly tests the later case in the overrider by making an HTTPS request for a path that has an interceptor but fails to match the query constraint.
…#1664) Fixes: #1422 The `allowUnmocked` option is processed in two places. Once in the intercept when there are no interceptors that come close to matching the request. And again in the overrider when there are interceptors that partially match, eg just path, but don't completely match. This fixes and explicitly tests the later case in the overrider by making an HTTPS request for a path that has an interceptor but fails to match the query constraint.
Fixes: #1422
The
allowUnmocked
option is processed in two places. Once in theintercept when there are no interceptors that come close to matching
the request. And again in the overrider when there are interceptors
that partially match, eg just path, but don't completely match.
This fixes and explicitly tests the later case in the overrider by
making an HTTPS request for a path that has an interceptor but fails to
match the query constraint.