HATEOAS-first backend framework.
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

data-source.ts 458 B

1234567891011121314
  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. });