Skip to content

feat: Add conditionally()#1488

Merged
paulmelnikow merged 7 commits intonock:betafrom
parisholley:filteringExternal
Apr 15, 2019
Merged

feat: Add conditionally()#1488
paulmelnikow merged 7 commits intonock:betafrom
parisholley:filteringExternal

Conversation

@parisholley
Copy link
Copy Markdown
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
Copy Markdown
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?

@paulmelnikow
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.
juninmd pushed a commit to juninmd/nock that referenced this pull request Mar 21, 2026
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.

3 participants