Currently, I am facing a challenge in mocking a class that includes a static property.
jest.mock("../../src/logger/index");
import { Logger } from "../../src/logger/index";
// ..
const LoggerMock = Logger as jest.MockedClass<typeof Logger>;
expect(LoggerMock).toHaveBeenCalledWith(Logger.level.WARN);
// ..
Despite successfully mocking the Class, the static property level
is returning undefined.
->
TypeError: Cannot read property 'WARN' of undefined
-> Can anyone provide guidance on how to effectively mock a class with a static property?
Thank you