Skip to content

Commit

Permalink
Chore: #115 더미 파일 설정 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
Seok93 committed Sep 27, 2024
1 parent aba0a39 commit 3e7e8bb
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
31 changes: 28 additions & 3 deletions src/mocks/mockData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ type TaskFile = {
fileUrl: string;
};

type FileInfo = {
fileId: number;
taskId: number;
file: Blob;
};

export const JWT_TOKEN_DUMMY = 'mocked-header.mocked-payload-4.mocked-signature';

export const emailVerificationCode = '1234';
Expand Down Expand Up @@ -689,19 +695,38 @@ export const TASK_FILE_DUMMY: TaskFile[] = [
{
fileId: 1,
taskId: 1,
fileName: '최종본.pdf',
fileName: '최종본.txt',
fileUrl: '',
},
{
fileId: 2,
taskId: 1,
fileName: '참고자료.pdf',
fileName: '참고자료.txt',
fileUrl: '',
},
{
fileId: 3,
taskId: 2,
fileName: '명세서.pdf',
fileName: '명세서.txt',
fileUrl: '',
},
];

// MSW 파일 임시 저장을 위한 변수
export const FILE_DUMMY: FileInfo[] = [
{
fileId: 1,
taskId: 1,
file: new Blob(['최종본 내용'], { type: 'text/plain' }),
},
{
fileId: 2,
taskId: 1,
file: new Blob(['참고자료 내용'], { type: 'text/plain' }),
},
{
fileId: 3,
taskId: 2,
file: new Blob(['명세서 내용'], { type: 'text/plain' }),
},
];
1 change: 1 addition & 0 deletions src/mocks/mockHash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import type { Project } from '@/types/ProjectType';
import type { ProjectStatus } from '@/types/ProjectStatusType';
import type { Task } from '@/types/TaskType';

// ToDo: undefined가 나올 수도 있음, 나중에 MSW CRUD 관련 로직들 함수로 모두 정리하기.
type Hash<T> = {
[key: string | number]: T;
};
Expand Down

0 comments on commit 3e7e8bb

Please sign in to comment.