Skip to content

Commit

Permalink
chore: add test for group
Browse files Browse the repository at this point in the history
  • Loading branch information
tyboro2002 committed Mar 29, 2024
1 parent f50067d commit 5dbbdb3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 0 additions & 1 deletion frontend/src/test/unit/group_service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ describe("group", (): void => {
expect(group.value?.project).toBeNull()
expect(group.value?.students).toEqual([]);
expect(group.value?.submissions).toEqual([]);
console.log(group.value)
})

it("gets groups data by project", async () => {
Expand Down
5 changes: 5 additions & 0 deletions frontend/src/test/unit/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ export const restHandlers = [
({ params }) => {
return HttpResponse.json(groups.find(x => x.id == params.id))
}
),
http.get(baseUrl + endpoints.groups.byProject.replace('{project_id}', ':id'),
({ params }) => {
return HttpResponse.json(groups.find(x => x.project == params.id))
}
)
]

Expand Down

0 comments on commit 5dbbdb3

Please sign in to comment.