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: allowMocked when using a callback for the path #1874

Closed
wants to merge 0 commits into from

Conversation

mastermatt
Copy link
Member

When an Interceptor was created with a comparator for the path, the
matchOrigin function was comparing the string equivalent of the function
instead of evaluating it.

I'm not a fan of the fact that the function matchOrigin is comparing the
pathname, but that's a refactor for another day.

Fixes: #1867

@@ -5,29 +5,30 @@
"requires": true,
"dependencies": {
"@babel/code-frame": {
"version": "7.5.5",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz",
"integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems unrelated. Can you reset it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On a fresh clone, I was unable to run npm install or npm ci because of issues with this lock file, specifically some semantic-release sub dep that removed a version from npmjs.com.

I'll remove this from this PR, but needs to addressed in general. @gr2m should we update semantic-release to ^17.0?

@mastermatt
Copy link
Member Author

Apparently I forgot how to use git for minute. I had to recreate the PR #1877

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

allowUnmocked option doesn't work properly for specified paths
2 participants