import { vi, type Mock } from "vitest"; import type { InboundShipmentRepository } from "../repository/inboundShipmentRepository"; export interface InboundShipmentRepositoryMock extends InboundShipmentRepository { findById: Mock; save: Mock; } // Injected through the commands' repositoryFactory parameter. vi.mock is not // an option: vitest runs with isolate: false, which shares the module cache // across test files. export function mockInboundShipmentRepository(): InboundShipmentRepositoryMock { return { findById: vi.fn().mockResolvedValue(null), save: vi.fn(), }; }