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 db2cd81 commit 0f0cac5
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 0f0cac5

Please sign in to comment.