wheresrhys/fetch-mock-jest

Feature request: Treat warnings as errors

Closed this issue · 1 comments

If an unexpected call occurs to the mock, I want my tests to fail.
It would be great if there was some MockBehavior.Strict mode, that does not do console.warn but throws an error instead.

This is the default behaviour, but any call to .catch(), .spy() or setting fallbackToNetwork: true overrides this. I suspect one of those might be getting applied in your code