tests: remove unused sleep function and clean up afterAll hook

This commit is contained in:
Carlos Santos 2025-04-23 17:33:20 +02:00
parent b3470d7ea0
commit b283c9d070

View File

@ -6,11 +6,9 @@ import {
getRoom, getRoom,
deleteRoom, deleteRoom,
joinFakeParticipant, joinFakeParticipant,
disconnectFakeParticipants, disconnectFakeParticipants
sleep
} from '../../../utils/helpers.js'; } from '../../../utils/helpers.js';
import ms from 'ms'; import ms from 'ms';
import { setupMultiRoomTestContext } from '../../../utils/test-scenarios.js';
import { expectValidRoom } from '../../../utils/assertion-helpers.js'; import { expectValidRoom } from '../../../utils/assertion-helpers.js';
describe('Room API Tests', () => { describe('Room API Tests', () => {
@ -18,9 +16,7 @@ describe('Room API Tests', () => {
startTestServer(); startTestServer();
}); });
afterAll(async () => { afterAll(async () => {});
});
afterEach(async () => { afterEach(async () => {
// Remove all rooms created // Remove all rooms created
@ -133,8 +129,6 @@ describe('Room API Tests', () => {
await disconnectFakeParticipants(); await disconnectFakeParticipants();
await sleep('6s');
const responseAfterDelete = await getRoom(roomId); const responseAfterDelete = await getRoom(roomId);
expect(responseAfterDelete.status).toBe(404); expect(responseAfterDelete.status).toBe(404);
}); });