-
Notifications
You must be signed in to change notification settings - Fork 89
Open
Description
Hello, I would like to know if it is possible to detect with the rules of this module, or with any other rule, if untyped mocks are used. For example:
const addMock = vi.fn();
const dependencyMock = {
add: addMock,
} as Dependency;
addMock.mockReturnValue(true);
const myTestedObject = new TestedObject(dependencyMock);
myTestedObject.init();
// init calls `add` from `addMock`
expect(addMock).toHaveBeenCalled();
In this example, addMock.mockReturnValue accepts a parameter with type any, and expect accepts a parameter with type Mock<Procedure>. I would like to detect these generic types.
Metadata
Metadata
Assignees
Labels
No labels