HATEOAS-first backend framework.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 regels
458 B

  1. import {vi} from 'vitest';
  2. export const createDummyDataSource = () => ({
  3. create: vi.fn(async (data) => data),
  4. getById: vi.fn(async () => ({})),
  5. delete: vi.fn(),
  6. emplace: vi.fn(async () => [{}, { isCreated: false }]),
  7. getMultiple: vi.fn(async () => []),
  8. getSingle: vi.fn(async () => ({})),
  9. getTotalCount: vi.fn(async () => 1),
  10. newId: vi.fn(async () => 1),
  11. patch: vi.fn(async (id, data) => ({ ...data, id })),
  12. initialize: vi.fn(async () => {}),
  13. });