Browse Source

Fixing rest test mocking.

gh-pages
mike12345567 5 years ago
parent
commit
24b2036e09
  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