test: add disconnectFakeParticipants call in afterAll hooks for cleanup
This commit is contained in:
parent
49ebe6cda2
commit
88fa90b00d
@ -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();
|
||||
});
|
||||
|
||||
|
||||
@ -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();
|
||||
});
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user