@directus/api
Version:
Directus is a real-time API and App dashboard for managing SQL database content
24 lines (23 loc) • 764 B
TypeScript
/**
* ItemsService mocking utilities for service tests
* Provides simplified mocks for src/services/items module used in service testing
*/
/**
* Creates a standard ItemsService mock for service tests
* This matches the pattern used across all service test files
*
* @returns Mock module object for vi.mock()
*
* @example
* ```typescript
* // Standard usage
* vi.mock('./items.js', () => mockItemsService());
*
* // To dynamically change ItemsService behavior during tests, import and mock directly:
* import { ItemsService } from './items.js';
* vi.spyOn(ItemsService.prototype, 'createOne').mockResolvedValue('new-id');
* ```
*/
export declare function mockItemsService(): {
ItemsService: import("vitest").Mock<(...args: any[]) => any>;
};