1
0
Fork 0
mirror of synced 2024-09-28 15:21:28 +12:00

Fixing rest test mocking.

This commit is contained in:
mike12345567 2021-11-03 15:45:19 +00:00
parent 9ce1866fab
commit 24b2036e09

View file

@ -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")