Skip to content

Commit

Permalink
#2770-fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
caiodasilva2005 committed Sep 20, 2024
1 parent 7081c60 commit bc54c1e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/backend/tests/unmocked/users.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,14 @@ describe('User Tests', () => {
await resetUsers();
});

describe('Get Users Tasks', async () => {
const testBatman = await createTestUser(batmanAppAdmin, orgId);
const { task } = await createTestTask(testBatman, organization);

describe('Get Users Tasks', () => {
it('fails on invalid user id', async () => {
expect(UsersService.getUserTasks('1', organization)).rejects.toThrow(new NotFoundException('User', '1'));

Check failure on line 21 in src/backend/tests/unmocked/users.test.ts

View workflow job for this annotation

GitHub Actions / run-linting-check

Async assertions must be awaited or returned
});

it("Succeeds and gets user's assigned tasks", async () => {
const testBatman = await createTestUser(batmanAppAdmin, orgId);
const { task } = await createTestTask(testBatman, organization);
const userTasks = await UsersService.getUserTasks(testBatman.userId, organization);

expect(userTasks).toStrictEqual([task]);
Expand Down

0 comments on commit bc54c1e

Please sign in to comment.