Skip to content

Commit

Permalink
test: fix jest compat test
Browse files Browse the repository at this point in the history
  • Loading branch information
wheresrhys committed Aug 3, 2024
1 parent ac680d3 commit 274c22b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/fetch-mock/test/framework-compat/jest.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/* global jest, it, describe, expect */
jest.mock('node-fetch', () => require('../../dist/commonjs.js').sandbox());
const fetchMock = require('../../dist/commonjs.js');
jest.mock('node-fetch', () =>
require('../../dist/commonjs.js').default.sandbox(),
);
const fetchMock = require('../../dist/commonjs.js').default;
const nodeFetch = require('node-fetch');
describe('compatibility with jest', () => {
it('works with node-fetch', async () => {
Expand Down

0 comments on commit 274c22b

Please sign in to comment.