|
- import {vi} from 'vitest';
-
- export const NEW_ID = 1;
-
- export const TOTAL_COUNT = 1;
-
- export const createDummyDataSource = () => ({
- create: vi.fn(async (data) => data),
- getById: vi.fn(async () => ({})),
- delete: vi.fn(),
- emplace: vi.fn(async () => [{}, { isCreated: false }]),
- getMultiple: vi.fn(async () => []),
- getSingle: vi.fn(async () => ({})),
- getTotalCount: vi.fn(async () => TOTAL_COUNT),
- newId: vi.fn(async () => NEW_ID),
- patch: vi.fn(async (id, data) => ({ ...data, id })),
- initialize: vi.fn(async () => {}),
- });
|