tests: fixed typos

This commit is contained in:
Carlos Santos 2025-04-23 14:26:38 +02:00
parent 221b19677c
commit a2aa400a71
11 changed files with 11 additions and 39 deletions

View File

@ -3,7 +3,6 @@ import {
createRoom, createRoom,
deleteAllRooms, deleteAllRooms,
startTestServer, startTestServer,
,
getRoom, getRoom,
joinFakeParticipant, joinFakeParticipant,
disconnectFakeParticipants, disconnectFakeParticipants,

View File

@ -1,13 +1,7 @@
import request from 'supertest'; import request from 'supertest';
import { describe, it, expect, beforeAll, afterAll } from '@jest/globals'; import { describe, it, expect, beforeAll, afterAll } from '@jest/globals';
import { Express } from 'express'; import { Express } from 'express';
import { import { createRoom, deleteAllRooms, loginUserAsRole, startTestServer } from '../../../utils/helpers.js';
createRoom,
deleteAllRooms,
loginUserAsRole,
startTestServer,
} from '../../../utils/helpers.js';
import { UserRole } from '../../../../src/typings/ce/user.js'; import { UserRole } from '../../../../src/typings/ce/user.js';
import INTERNAL_CONFIG from '../../../../src/config/internal-config.js'; import INTERNAL_CONFIG from '../../../../src/config/internal-config.js';
import ms from 'ms'; import ms from 'ms';
@ -28,7 +22,6 @@ describe('Room API Tests', () => {
afterAll(async () => { afterAll(async () => {
await deleteAllRooms(); await deleteAllRooms();
}); });
describe('Room Creation Tests', () => { describe('Room Creation Tests', () => {

View File

@ -3,7 +3,6 @@ import {
createRoom, createRoom,
deleteAllRooms, deleteAllRooms,
startTestServer, startTestServer,
,
getRoom, getRoom,
deleteRoom, deleteRoom,
joinFakeParticipant, joinFakeParticipant,

View File

@ -3,7 +3,6 @@ import {
createRoom, createRoom,
deleteAllRooms, deleteAllRooms,
startTestServer, startTestServer,
,
getRoom, getRoom,
sleep, sleep,
joinFakeParticipant, joinFakeParticipant,

View File

@ -1,5 +1,5 @@
import { describe, it, expect, beforeAll, afterAll, afterEach } from '@jest/globals'; import { describe, it, expect, beforeAll, afterAll, afterEach } from '@jest/globals';
import { createRoom, deleteAllRooms, startTestServer, , getRoom } from '../../../utils/helpers.js'; import { createRoom, deleteAllRooms, startTestServer, getRoom } from '../../../utils/helpers.js';
import ms from 'ms'; import ms from 'ms';
import { import {
expectSuccessRoomResponse, expectSuccessRoomResponse,
@ -13,9 +13,7 @@ describe('Room API Tests', () => {
startTestServer(); startTestServer();
}); });
afterAll(async () => { afterAll(async () => {});
});
afterEach(async () => { afterEach(async () => {
// Remove all rooms created // Remove all rooms created

View File

@ -1,21 +1,12 @@
import { describe, it, expect, beforeAll, afterAll, afterEach } from '@jest/globals'; import { describe, it, expect, beforeAll, afterAll, afterEach } from '@jest/globals';
import { import { createRoom, deleteAllRooms, startTestServer, getRoom, updateRoomPreferences } from '../../../utils/helpers.js';
createRoom,
deleteAllRooms,
startTestServer,
,
getRoom,
updateRoomPreferences
} from '../../../utils/helpers.js';
describe('Room API Tests', () => { describe('Room API Tests', () => {
beforeAll(async () => { beforeAll(async () => {
startTestServer(); startTestServer();
}); });
afterAll(async () => { afterAll(async () => {});
});
afterEach(async () => { afterEach(async () => {
// Remove all rooms created // Remove all rooms created

View File

@ -1,7 +1,7 @@
import request from 'supertest'; import request from 'supertest';
import { describe, it, expect, beforeAll, afterAll } from '@jest/globals'; import { describe, it, expect, beforeAll, afterAll } from '@jest/globals';
import { Express } from 'express'; import { Express } from 'express';
import { loginUserAsRole, startTestServer, } from '../../../utils/helpers.js'; import { loginUserAsRole, startTestServer } from '../../../utils/helpers.js';
import INTERNAL_CONFIG from '../../../../src/config/internal-config.js'; import INTERNAL_CONFIG from '../../../../src/config/internal-config.js';
import { UserRole } from '../../../../src/typings/ce/index.js'; import { UserRole } from '../../../../src/typings/ce/index.js';
@ -14,9 +14,7 @@ describe('Authentication API Tests', () => {
app = startTestServer(); app = startTestServer();
}); });
afterAll(async () => { afterAll(async () => {});
});
describe('Login Tests', () => { describe('Login Tests', () => {
it('should successfully login with valid credentials', async () => { it('should successfully login with valid credentials', async () => {

View File

@ -1,7 +1,7 @@
import request from 'supertest'; import request from 'supertest';
import { describe, it, expect, beforeAll, afterAll } from '@jest/globals'; import { describe, it, expect, beforeAll, afterAll } from '@jest/globals';
import { Express } from 'express'; import { Express } from 'express';
import { createRoom, generateParticipantToken, startTestServer, } from '../../../utils/helpers.js'; import { createRoom, generateParticipantToken, startTestServer } from '../../../utils/helpers.js';
import { UserRole } from '../../../../src/typings/ce/index.js'; import { UserRole } from '../../../../src/typings/ce/index.js';
import INTERNAL_CONFIG from '../../../../src/config/internal-config.js'; import INTERNAL_CONFIG from '../../../../src/config/internal-config.js';
import { MeetRoomHelper } from '../../../../src/helpers/room.helper.js'; import { MeetRoomHelper } from '../../../../src/helpers/room.helper.js';
@ -35,7 +35,6 @@ describe('Meeting API Security Tests', () => {
afterAll(async () => { afterAll(async () => {
await deleteAllRooms(); await deleteAllRooms();
}, 20000); }, 20000);
describe('End Meeting Tests', () => { describe('End Meeting Tests', () => {

View File

@ -1,7 +1,7 @@
import request from 'supertest'; import request from 'supertest';
import { describe, it, expect, beforeAll, afterAll } from '@jest/globals'; import { describe, it, expect, beforeAll, afterAll } from '@jest/globals';
import { Express } from 'express'; import { Express } from 'express';
import { createRoom, startTestServer, } from '../../../utils/helpers.js'; import { createRoom, startTestServer } from '../../../utils/helpers.js';
import { AuthMode, UserRole } from '../../../../src/typings/ce/index.js'; import { AuthMode, UserRole } from '../../../../src/typings/ce/index.js';
import INTERNAL_CONFIG from '../../../../src/config/internal-config.js'; import INTERNAL_CONFIG from '../../../../src/config/internal-config.js';
import { MeetRoomHelper } from '../../../../src/helpers/room.helper.js'; import { MeetRoomHelper } from '../../../../src/helpers/room.helper.js';
@ -38,7 +38,6 @@ describe('Participant API Security Tests', () => {
afterAll(async () => { afterAll(async () => {
await deleteAllRooms(); await deleteAllRooms();
}, 20000); }, 20000);
describe('Generate Participant Token Tests', () => { describe('Generate Participant Token Tests', () => {

View File

@ -6,8 +6,7 @@ import {
deleteAllRooms, deleteAllRooms,
generateParticipantToken, generateParticipantToken,
loginUserAsRole, loginUserAsRole,
startTestServer, startTestServer
} from '../../../utils/helpers.js'; } from '../../../utils/helpers.js';
import { MEET_API_KEY } from '../../../../src/environment.js'; import { MEET_API_KEY } from '../../../../src/environment.js';
import INTERNAL_CONFIG from '../../../../src/config/internal-config.js'; import INTERNAL_CONFIG from '../../../../src/config/internal-config.js';
@ -49,7 +48,6 @@ describe('Recording API Security Tests', () => {
afterAll(async () => { afterAll(async () => {
await deleteAllRooms(); await deleteAllRooms();
}, 20000); }, 20000);
describe('Start Recording Tests', () => { describe('Start Recording Tests', () => {

View File

@ -1,7 +1,7 @@
import request from 'supertest'; import request from 'supertest';
import { describe, it, expect, beforeAll, beforeEach, afterAll } from '@jest/globals'; import { describe, it, expect, beforeAll, beforeEach, afterAll } from '@jest/globals';
import { Express } from 'express'; import { Express } from 'express';
import { createRoom, generateParticipantToken, startTestServer, } from '../../../utils/helpers.js'; import { createRoom, generateParticipantToken, startTestServer } from '../../../utils/helpers.js';
import { AuthMode, UserRole } from '../../../../src/typings/ce/index.js'; import { AuthMode, UserRole } from '../../../../src/typings/ce/index.js';
import { MEET_API_KEY } from '../../../../src/environment.js'; import { MEET_API_KEY } from '../../../../src/environment.js';
import INTERNAL_CONFIG from '../../../../src/config/internal-config.js'; import INTERNAL_CONFIG from '../../../../src/config/internal-config.js';
@ -26,7 +26,6 @@ describe('Room API Security Tests', () => {
afterAll(async () => { afterAll(async () => {
await deleteAllRooms(); await deleteAllRooms();
}, 20000); }, 20000);
describe('Create Room Tests', () => { describe('Create Room Tests', () => {