Fixing rest test mocking.
This commit is contained in:
parent
88a729913c
commit
b2bf5056b5
|
@ -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…
Reference in New Issue