Skip to content

Commit

Permalink
fix a test that should've always failed reallyI guess node 15 is stri…
Browse files Browse the repository at this point in the history
…cter about some things
  • Loading branch information
wheresrhys committed Nov 21, 2020
1 parent f6f4d08 commit 18041fb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/specs/config/fallbackToNetwork.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand All @@ -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 () => {
Expand Down

0 comments on commit 18041fb

Please sign in to comment.