h2non / gock

HTTP traffic mocking and testing made easy in Go ༼ʘ̚ل͜ʘ̚༽

Home Page:https://pkg.go.dev/github.com/h2non/gock

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ability to flush only certain mocks

dmitryrn opened this issue · comments

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.

commented