Skip to content

Commit

Permalink
feat: update factory item and member default (#420)
Browse files Browse the repository at this point in the history
  • Loading branch information
pyphilia authored Feb 21, 2024
1 parent 0ae54f8 commit 0f7a864
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/services/action/actionFactory.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { Action } from '.';
import { FolderItemFactory, MemberFactory } from '..';
import { Action } from './interfaces';
import { Context } from '@/constants';
import { faker } from '@faker-js/faker';

export const ActionFactory = (a: Partial<Action> = {}): Action => ({
id: faker.string.uuid(),
item: faker.helpers.arrayElement([FolderItemFactory(), null]),
member: faker.helpers.arrayElement([MemberFactory(), null]),
// member and item default to null
member: null,
item: null,
view: faker.helpers.arrayElement(Object.values(Context)),
type: faker.lorem.word(),
extra: { value: faker.lorem.word() },
Expand Down

0 comments on commit 0f7a864

Please sign in to comment.