Wrap an object or a module with mock definitions
jest.mock("../api"); import * as api from "../api"; const mockApi = api as jest.Mocked<typeof api>; api.MyApi.prototype.myApiMethod.mockImplementation(() => "test"); Copy
jest.mock("../api"); import * as api from "../api"; const mockApi = api as jest.Mocked<typeof api>; api.MyApi.prototype.myApiMethod.mockImplementation(() => "test");
Wrap an object or a module with mock definitions