moduleMockReplace module mocking with dependency injection through a real interface, service layer, or faithful test implementation.small-rules/no-module-mockingDisallow Vitest and Jest module mocking; tests must replace dependencies through real interfaces.
Ported from dmmulroy/anti-slop. Module mocks make tests depend on import machinery instead of the dependency seam the production code actually owns. Use a real interface, service layer, or faithful in-memory implementation.
moduleMockReplace module mocking with dependency injection through a real interface, service layer, or faithful test implementation.This rule does not accept options.
vi.mock('./user-store');const store = new InMemoryUserStore();