Reputation: 911
When a request is made and wasn't mocked I get an error: Error: Nock: No match for request
but that doesn't fail the test. Is there a way to make sure no mocked requests were made?
Upvotes: 3
Views: 1392
Reputation: 2470
You can catch the "no match" event from nock nock.emitter.on('no match', callback)
and use the callback to trigger the error path in your test framework.
Upvotes: 2