refactor(editor): Fix remaining FE type check errors (no-changelog) (#9607)
Co-authored-by: Alex Grozav <alex@grozav.com>
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
import { faker } from '@faker-js/faker';
|
||||
import type { ProjectListItem, ProjectSharingData, ProjectType } from '@/types/projects.types';
|
||||
import type {
|
||||
Project,
|
||||
ProjectListItem,
|
||||
ProjectSharingData,
|
||||
ProjectType,
|
||||
} from '@/types/projects.types';
|
||||
import { ProjectTypes } from '@/types/projects.types';
|
||||
|
||||
export const createProjectSharingData = (projectType?: ProjectType): ProjectSharingData => ({
|
||||
@@ -19,3 +24,16 @@ export const createProjectListItem = (projectType?: ProjectType): ProjectListIte
|
||||
updatedAt: faker.date.recent().toISOString(),
|
||||
};
|
||||
};
|
||||
|
||||
export function createTestProject(data: Partial<Project>): Project {
|
||||
return {
|
||||
id: faker.string.uuid(),
|
||||
name: faker.lorem.words({ min: 1, max: 3 }),
|
||||
createdAt: faker.date.past().toISOString(),
|
||||
updatedAt: faker.date.recent().toISOString(),
|
||||
type: 'team',
|
||||
relations: [],
|
||||
scopes: [],
|
||||
...data,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user