Fixing rest test mocking.
This commit is contained in:
parent
9ce1866fab
commit
24b2036e09
|
@ -1,5 +1,11 @@
|
||||||
jest.mock("node-fetch", () =>
|
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 fetch = require("node-fetch")
|
||||||
const RestIntegration = require("../rest")
|
const RestIntegration = require("../rest")
|
||||||
|
|
Loading…
Reference in New Issue