diff --git a/test/specs/config/fallbackToNetwork.test.js b/test/specs/config/fallbackToNetwork.test.js index 40499c16..22bb4562 100644 --- a/test/specs/config/fallbackToNetwork.test.js +++ b/test/specs/config/fallbackToNetwork.test.js @@ -13,9 +13,11 @@ describe('fallbackToNetwork', () => { }); it('not error when configured globally', async () => { + theGlobal.fetch = async () => ({ status: 202 }); fm.config.fallbackToNetwork = true; fm.mock('http://mocked.com', 201); expect(() => fm.fetchHandler('http://unmocked.com')).not.to.throw(); + delete theGlobal.fetch }); it('actually falls back to network when configured globally', async () => { @@ -26,6 +28,7 @@ describe('fallbackToNetwork', () => { expect(res.status).to.equal(202); fetchMock.restore(); fetchMock.config.fallbackToNetwork = false; + delete theGlobal.fetch }); it('actually falls back to network when configured in a sandbox properly', async () => {