forked from nock/nock
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: allow unmocked when providing literal search params.
fixes: nock#1421 There was inconsistent behavior around how search params were handled when they were provided as part of a URI string to new Interceptors. The issue happen to come to light when `allowUnmocked` was set. The fix normalizes the behavior by refactoring the constructor of Interceptor to look for literal search params. If present, they're stripped from the `path` attribute and set via the `query` method. As part of the work, `Interceptor.query` was modified to accept `URLSearchParams` instances as valid input.
- Loading branch information
1 parent
7eef487
commit faf417d
Showing
4 changed files
with
96 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters