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

Ability to flush only certain mocks #76

Open
dmitryrn opened this issue Nov 8, 2020 · 1 comment
Open

Ability to flush only certain mocks #76

dmitryrn opened this issue Nov 8, 2020 · 1 comment
Labels

Comments

@dmitryrn
Copy link

dmitryrn commented Nov 8, 2020

Right now you can only flush all of the mocks, right? What if I want to flush only certain mocks because I want some mocks to remain?

The case: I've started my service before running any tests, my service fetching some URLs during tests (just by timer), so I want some mocks to remain during all tests run, but at the same time I want to flush test-mocks after each test run.

@h2non h2non added the question label Nov 10, 2020
@h2non
Copy link
Owner

h2non commented Nov 10, 2020

Check out: gock.Remove(mock)

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

No branches or pull requests

2 participants