1
0
Fork 0
mirror of synced 2024-10-01 01:28:51 +13:00

Fixing rest test mocking.

This commit is contained in:
mike12345567 2021-11-03 15:45:19 +00:00
parent 88a729913c
commit b2bf5056b5

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