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

Reset unmatchedRequests during Off()

nikolay-turpitko opened this issue · comments

I think, it could be nice to reset unmatchedRequests during Off() so that unit tests will be more independent of each other.

commented

In gock@v1.0.5 you can now use: gock.CleanUnmatchedRequests() or gock.OffAll(), which behaves like gock.Off() + gock.CleanUnmatchedRequests.