diff --git a/backend/tests/integration/api/users/change-password.test.ts b/backend/tests/integration/api/users/change-password.test.ts index e3977a2..82a8bd7 100644 --- a/backend/tests/integration/api/users/change-password.test.ts +++ b/backend/tests/integration/api/users/change-password.test.ts @@ -21,10 +21,10 @@ describe('Users API Tests', () => { expect(response.status).toBe(200); expect(response.body).toHaveProperty('message', 'Password changed successfully'); }); - }); - it('should fail when new password is not 4 characters long', async () => { - const response = await changePassword('123', adminCookie); - expectValidationError(response, 'newPassword', 'New password must be at least 4 characters long'); + it('should fail when new password is not 4 characters long', async () => { + const response = await changePassword('123', adminCookie); + expectValidationError(response, 'newPassword', 'New password must be at least 4 characters long'); + }); }); }); diff --git a/backend/tests/integration/api/users/get-profile.test.ts b/backend/tests/integration/api/users/get-profile.test.ts index e954569..79a19a8 100644 --- a/backend/tests/integration/api/users/get-profile.test.ts +++ b/backend/tests/integration/api/users/get-profile.test.ts @@ -1,10 +1,11 @@ import { beforeAll, describe, expect, it } from '@jest/globals'; -import { getProfile, loginUser } from '../../../helpers/request-helpers.js'; +import { getProfile, loginUser, startTestServer } from '../../../helpers/request-helpers.js'; describe('Users API Tests', () => { let adminCookie: string; beforeAll(async () => { + startTestServer(); adminCookie = await loginUser(); });