Browse Source

Fixing rest test mocking.

pull/4023/head
mike12345567 5 years ago
parent
commit
b2bf5056b5
  1. 8
      packages/server/src/integrations/tests/rest.spec.js

8
packages/server/src/integrations/tests/rest.spec.js

@ -1,5 +1,11 @@
jest.mock("node-fetch", () =>
jest.fn(() => ({ json: jest.fn(), text: jest.fn() }))
jest.fn(() => ({
headers: {
get: () => ["application/json"]
},
json: jest.fn(),
text: jest.fn()
}))
)
const fetch = require("node-fetch")
const RestIntegration = require("../rest")

Loading…
Cancel
Save