jest.setup.js 269 B

1234567891011
  1. const fetch = require("node-fetch");
  2. const nock = require("nock");
  3. global.fetch = window.fetch = fetch;
  4. global.Request = window.Request = fetch.Request;
  5. global.Response = window.Response = fetch.Response;
  6. afterAll(() => {
  7. nock.cleanAll();
  8. nock.restore();
  9. });