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 { afterAll, beforeAll, describe, expect, it } from '@jest/globals';
|
||||||
import { ParticipantRole } from '../../../../src/typings/ce/participant.js';
|
import { ParticipantRole } from '../../../../src/typings/ce/participant.js';
|
||||||
import { expectValidationError, expectValidParticipantTokenResponse } from '../../../helpers/assertion-helpers.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';
|
import { RoomData, setupSingleRoom } from '../../../helpers/test-scenarios.js';
|
||||||
|
|
||||||
const participantName = 'TEST_PARTICIPANT';
|
const participantName = 'TEST_PARTICIPANT';
|
||||||
@ -15,6 +20,7 @@ describe('Participant API Tests', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
afterAll(async () => {
|
afterAll(async () => {
|
||||||
|
await disconnectFakeParticipants();
|
||||||
await deleteAllRooms();
|
await deleteAllRooms();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,12 @@
|
|||||||
import { afterAll, beforeAll, describe, expect, it } from '@jest/globals';
|
import { afterAll, beforeAll, describe, expect, it } from '@jest/globals';
|
||||||
import { ParticipantRole } from '../../../../src/typings/ce/participant.js';
|
import { ParticipantRole } from '../../../../src/typings/ce/participant.js';
|
||||||
import { expectValidationError, expectValidParticipantTokenResponse } from '../../../helpers/assertion-helpers.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';
|
import { RoomData, setupSingleRoom } from '../../../helpers/test-scenarios.js';
|
||||||
|
|
||||||
const participantName = 'TEST_PARTICIPANT';
|
const participantName = 'TEST_PARTICIPANT';
|
||||||
@ -15,6 +20,7 @@ describe('Participant API Tests', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
afterAll(async () => {
|
afterAll(async () => {
|
||||||
|
await disconnectFakeParticipants();
|
||||||
await deleteAllRooms();
|
await deleteAllRooms();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import {
|
|||||||
deleteAllRecordings,
|
deleteAllRecordings,
|
||||||
deleteAllRooms,
|
deleteAllRooms,
|
||||||
deleteRoom,
|
deleteRoom,
|
||||||
|
disconnectFakeParticipants,
|
||||||
generateRecordingToken,
|
generateRecordingToken,
|
||||||
startTestServer,
|
startTestServer,
|
||||||
updateRecordingAccessPreferencesInRoom
|
updateRecordingAccessPreferencesInRoom
|
||||||
@ -21,6 +22,7 @@ describe('Room API Tests', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
afterAll(async () => {
|
afterAll(async () => {
|
||||||
|
await disconnectFakeParticipants();
|
||||||
await deleteAllRecordings();
|
await deleteAllRecordings();
|
||||||
await deleteAllRooms();
|
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 () => {
|
it('should fail with a 404 error if there are no recordings in the room', async () => {
|
||||||
await deleteAllRecordings();
|
await deleteAllRecordings();
|
||||||
|
|
||||||
const response = await generateRecordingToken(roomData.room.roomId, roomData.moderatorSecret);
|
const response = await generateRecordingToken(roomData.room.roomId, roomData.moderatorSecret);
|
||||||
expect(response.status).toBe(404);
|
expect(response.status).toBe(404);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user