test: fix indentation in change password tests and ensure server starts in get profile tests
This commit is contained in:
parent
a86e1a4a08
commit
b24a38ef55
@ -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');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@ -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();
|
||||
});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user