Skip to content
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

fix: allow unmocked when providing literal search params. #1614

Merged
merged 2 commits into from
Jul 15, 2019

Commits on Jul 15, 2019

  1. 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.
    mastermatt committed Jul 15, 2019
    Configuration menu
    Copy the full SHA
    a953db4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4beedcd View commit details
    Browse the repository at this point in the history