the snippet above results in an error
"_ky.default.post(...).json is not a function"
The main question is: What is the correct way to use jests' mockResolvedValue with ky? I have not found any examples of this usage yet. any examples would be greatly appreciated.
Thank you!
import ky from "ky";
jest.mock("ky");
it("should fetch data", () => { ky.post.mockResolvedValue(() => ({ json: () => Promise.resolve(resp), })); } )
the snippet above results in an error "_ky.default.post(...).json is not a function"
The main question is: What is the correct way to use jests' mockResolvedValue with ky? I have not found any examples of this usage yet. any examples would be greatly appreciated. Thank you!