Skip to content

Commit 5796be0

Browse files
fix: 테스트 코드 수정
1 parent 51eaf14 commit 5796be0

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

apps/backend/src/workspace/workspace.service.spec.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ describe('WorkspaceService', () => {
8383

8484
const owner = { id: userId } as User;
8585
const newDate = new Date();
86-
const newWorkspace: Workspace = {
86+
const newWorkspace = {
8787
id: 1,
8888
snowflakeId: 'snowflake-id',
8989
owner,
@@ -96,7 +96,7 @@ describe('WorkspaceService', () => {
9696
edges: [],
9797
pages: [],
9898
nodes: [],
99-
};
99+
} as Workspace;
100100

101101
jest.spyOn(userRepository, 'findOneBy').mockResolvedValue(owner);
102102
jest.spyOn(workspaceRepository, 'save').mockResolvedValue(newWorkspace);
@@ -139,7 +139,7 @@ describe('WorkspaceService', () => {
139139
const workspaceId = 'snowflake-id';
140140
const newDate = new Date();
141141

142-
const workspace: Workspace = {
142+
const workspace = {
143143
id: 1,
144144
snowflakeId: workspaceId,
145145
owner: { id: userId } as User,
@@ -152,7 +152,7 @@ describe('WorkspaceService', () => {
152152
edges: [],
153153
pages: [],
154154
nodes: [],
155-
};
155+
} as Workspace;
156156

157157
const role: Role = {
158158
workspaceId: workspace.id,
@@ -189,7 +189,7 @@ describe('WorkspaceService', () => {
189189
});
190190

191191
it('현재 요청하는 사용자가 워크스페이스의 owner이 아닐 경우 NotWorkspaceOwnerException을 throw한다.', async () => {
192-
const workspace: Workspace = {
192+
const workspace = {
193193
id: 1,
194194
snowflakeId: 'snowflake-id',
195195
owner: null,
@@ -202,7 +202,7 @@ describe('WorkspaceService', () => {
202202
edges: [],
203203
pages: [],
204204
nodes: [],
205-
};
205+
} as Workspace;
206206

207207
jest.spyOn(workspaceRepository, 'findOneBy').mockResolvedValue(workspace);
208208
jest.spyOn(roleRepository, 'findOneBy').mockResolvedValue(null);
@@ -216,7 +216,7 @@ describe('WorkspaceService', () => {
216216
describe('getUserWorkspaces', () => {
217217
it('현재 요청하는 사용자가 참여하고 있는 워크스페이스들을 반환한다.', async () => {
218218
const userId = 1;
219-
const workspace: Workspace = {
219+
const workspace = {
220220
id: 1,
221221
snowflakeId: 'snowflake-id',
222222
owner: null,
@@ -229,7 +229,7 @@ describe('WorkspaceService', () => {
229229
edges: [],
230230
pages: [],
231231
nodes: [],
232-
};
232+
} as Workspace;
233233

234234
const role: Role = {
235235
workspaceId: workspace.id,

0 commit comments

Comments
 (0)