tests: Fix createRoom function by using roomIdPrefix instead of roomPrefix and add default value

This commit is contained in:
juancarmore 2025-04-11 11:18:47 +02:00
parent b78af0eff2
commit ba726fe90f

View File

@ -131,7 +131,7 @@ export const loginUserAsRole = async (role: UserRole): Promise<string> => {
/**
* Creates a room with the given prefix
*/
export const createRoom = async (roomPrefix?: string): Promise<MeetRoom> => {
export const createRoom = async (roomIdPrefix = 'test'): Promise<MeetRoom> => {
if (!app) {
throw new Error('App instance is not defined');
}
@ -139,7 +139,7 @@ export const createRoom = async (roomPrefix?: string): Promise<MeetRoom> => {
const response = await request(app)
.post(`${MEET_API_BASE_PATH_V1}/rooms`)
.set(API_KEY_HEADER, MEET_API_KEY)
.send({ roomPrefix })
.send({ roomIdPrefix })
.expect(200);
return response.body;
};