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

feat: Add conditionally() #1488

Merged
merged 7 commits into from Apr 15, 2019
Merged

Conversation

parisholley
Copy link
Contributor

I am building a test framework which depends on nock and to support concurrency, I need to be able shutoff certain scopes (to prevent cross-pollination) when running tests concurrently

Copy link
Member

@paulmelnikow paulmelnikow left a comment

Choose a reason for hiding this comment

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

Hi! Thanks for this.

I think this feature makes sense to include.

Though filter is a nice name for this function, it's already being used for filteringScope and filteringRequestBody, and this is doing something pretty different. What do you think about calling it conditionally() instead?

Could you add an entry to the readme documenting the new API?

lib/interceptor.js Outdated Show resolved Hide resolved
package-lock.json Outdated Show resolved Hide resolved
tests/test_intercept.js Show resolved Hide resolved
@paulmelnikow
Copy link
Member

Hi @parisholley it would be great to get this merged! Would you have time to address any of the open items?

@parisholley
Copy link
Contributor Author

@paulmelnikow done

@paulmelnikow paulmelnikow changed the title Feature: Ability to completely disable a scope based on external data feat: Add conditionally() Apr 15, 2019
Copy link
Member

@paulmelnikow paulmelnikow left a comment

Choose a reason for hiding this comment

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

Thanks so much!! 🙌

@paulmelnikow paulmelnikow merged commit 24e5b47 into nock:beta Apr 15, 2019
@nockbot
Copy link
Collaborator

nockbot commented Apr 15, 2019

🎉 This PR is included in version 11.0.0-beta.10 🎉

The release is available on:

Your semantic-release bot 📦🚀

@nockbot
Copy link
Collaborator

nockbot commented Aug 12, 2019

🎉 This PR is included in version 11.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

gr2m pushed a commit that referenced this pull request Sep 4, 2019
I am building a test framework which depends on nock and to support concurrency, I need to be able shutoff certain scopes (to prevent cross-pollination) when running tests concurrently.
gr2m pushed a commit that referenced this pull request Sep 4, 2019
I am building a test framework which depends on nock and to support concurrency, I need to be able shutoff certain scopes (to prevent cross-pollination) when running tests concurrently.
gr2m pushed a commit that referenced this pull request Sep 5, 2019
I am building a test framework which depends on nock and to support concurrency, I need to be able shutoff certain scopes (to prevent cross-pollination) when running tests concurrently.
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.

None yet

3 participants