diff --git a/backend/tests/integration/api/participants/generate-token.test.ts b/backend/tests/integration/api/participants/generate-token.test.ts index bac9f07..46fd22b 100644 --- a/backend/tests/integration/api/participants/generate-token.test.ts +++ b/backend/tests/integration/api/participants/generate-token.test.ts @@ -1,7 +1,12 @@ import { afterAll, beforeAll, describe, expect, it } from '@jest/globals'; import { ParticipantRole } from '../../../../src/typings/ce/participant.js'; import { expectValidationError, expectValidParticipantTokenResponse } from '../../../helpers/assertion-helpers.js'; -import { deleteAllRooms, generateParticipantToken, startTestServer } from '../../../helpers/request-helpers.js'; +import { + deleteAllRooms, + disconnectFakeParticipants, + generateParticipantToken, + startTestServer +} from '../../../helpers/request-helpers.js'; import { RoomData, setupSingleRoom } from '../../../helpers/test-scenarios.js'; const participantName = 'TEST_PARTICIPANT'; @@ -15,6 +20,7 @@ describe('Participant API Tests', () => { }); afterAll(async () => { + await disconnectFakeParticipants(); await deleteAllRooms(); }); diff --git a/backend/tests/integration/api/participants/refresh-token.test.ts b/backend/tests/integration/api/participants/refresh-token.test.ts index f6e4336..5aabd9d 100644 --- a/backend/tests/integration/api/participants/refresh-token.test.ts +++ b/backend/tests/integration/api/participants/refresh-token.test.ts @@ -1,7 +1,12 @@ import { afterAll, beforeAll, describe, expect, it } from '@jest/globals'; import { ParticipantRole } from '../../../../src/typings/ce/participant.js'; import { expectValidationError, expectValidParticipantTokenResponse } from '../../../helpers/assertion-helpers.js'; -import { deleteAllRooms, refreshParticipantToken, startTestServer } from '../../../helpers/request-helpers.js'; +import { + deleteAllRooms, + disconnectFakeParticipants, + refreshParticipantToken, + startTestServer +} from '../../../helpers/request-helpers.js'; import { RoomData, setupSingleRoom } from '../../../helpers/test-scenarios.js'; const participantName = 'TEST_PARTICIPANT'; @@ -15,6 +20,7 @@ describe('Participant API Tests', () => { }); afterAll(async () => { + await disconnectFakeParticipants(); await deleteAllRooms(); }); diff --git a/backend/tests/integration/api/rooms/generate-recording-token.test.ts b/backend/tests/integration/api/rooms/generate-recording-token.test.ts index b36716d..2c9a214 100644 --- a/backend/tests/integration/api/rooms/generate-recording-token.test.ts +++ b/backend/tests/integration/api/rooms/generate-recording-token.test.ts @@ -6,6 +6,7 @@ import { deleteAllRecordings, deleteAllRooms, deleteRoom, + disconnectFakeParticipants, generateRecordingToken, startTestServer, updateRecordingAccessPreferencesInRoom @@ -21,6 +22,7 @@ describe('Room API Tests', () => { }); afterAll(async () => { + await disconnectFakeParticipants(); await deleteAllRecordings(); await deleteAllRooms(); }); @@ -87,7 +89,7 @@ describe('Room API Tests', () => { it('should fail with a 404 error if there are no recordings in the room', async () => { await deleteAllRecordings(); - + const response = await generateRecordingToken(roomData.room.roomId, roomData.moderatorSecret); expect(response.status).toBe(404);