tests: Renamed utils directory to helpers

This commit is contained in:
Carlos Santos 2025-04-29 13:48:45 +02:00
parent 473531792e
commit b98d4d0cd9
23 changed files with 38 additions and 38 deletions

View File

@ -7,7 +7,7 @@ import {
sleep,
startRecording,
stopRecording
} from './helpers';
} from './request-helpers';
import ms, { StringValue } from 'ms';
import { MeetRoom, UserRole } from '../../src/typings/ce';

View File

@ -1,7 +1,7 @@
import { afterAll, beforeAll, describe, expect, it } from '@jest/globals';
import { container } from '../../../../src/config';
import { MeetStorageService } from '../../../../src/services';
import { expectValidationError, expectValidStartRecordingResponse } from '../../../utils/assertion-helpers';
import { expectValidationError, expectValidStartRecordingResponse } from '../../../helpers/assertion-helpers';
import {
bulkDeleteRecordings,
deleteAllRecordings,
@ -9,8 +9,8 @@ import {
startRecording,
startTestServer,
stopRecording
} from '../../../utils/helpers';
import { setupMultiRecordingsTestContext } from '../../../utils/test-scenarios';
} from '../../../helpers/request-helpers';
import { setupMultiRecordingsTestContext } from '../../../helpers/test-scenarios';
describe('Recording API Tests', () => {
beforeAll(() => {

View File

@ -1,7 +1,7 @@
import { afterAll, beforeAll, beforeEach, describe, expect, it } from '@jest/globals';
import { container } from '../../../../src/config';
import { MeetStorageService } from '../../../../src/services';
import { expectValidationError, expectValidStartRecordingResponse } from '../../../utils/assertion-helpers';
import { expectValidationError, expectValidStartRecordingResponse } from '../../../helpers/assertion-helpers';
import {
deleteAllRecordings,
deleteAllRooms,
@ -10,8 +10,8 @@ import {
startTestServer,
stopAllRecordings,
stopRecording
} from '../../../utils/helpers';
import { setupMultiRecordingsTestContext } from '../../../utils/test-scenarios';
} from '../../../helpers/request-helpers';
import { setupMultiRecordingsTestContext } from '../../../helpers/test-scenarios';
import { MeetRoom } from '../../../../src/typings/ce';
describe('Recording API Tests', () => {

View File

@ -1,5 +1,5 @@
import { afterAll, beforeAll, describe, expect, it } from '@jest/globals';
import { expectSuccessRecordingMediaResponse, expectValidationError } from '../../../utils/assertion-helpers';
import { expectSuccessRecordingMediaResponse, expectValidationError } from '../../../helpers/assertion-helpers';
import {
deleteAllRecordings,
deleteAllRooms,
@ -7,8 +7,8 @@ import {
startTestServer,
stopAllRecordings,
stopRecording
} from '../../../utils/helpers';
import { setupMultiRecordingsTestContext } from '../../../utils/test-scenarios';
} from '../../../helpers/request-helpers';
import { setupMultiRecordingsTestContext } from '../../../helpers/test-scenarios';
import { MeetRoom } from '../../../../src/typings/ce';
describe('Recording API Tests', () => {

View File

@ -6,13 +6,13 @@ import {
getRecording,
startTestServer,
stopAllRecordings
} from '../../../utils/helpers.js';
} from '../../../helpers/request-helpers.js';
import { errorRecordingNotFound } from '../../../../src/models/error.model.js';
import { MeetRecordingStatus } from '../../../../src/typings/ce/recording.model.js';
import { MeetRoom } from '../../../../src/typings/ce/room.js';
import { expectValidationError, expectValidGetRecordingResponse } from '../../../utils/assertion-helpers.js';
import { setupMultiRecordingsTestContext, TestContext } from '../../../utils/test-scenarios.js';
import { expectValidationError, expectValidGetRecordingResponse } from '../../../helpers/assertion-helpers.js';
import { setupMultiRecordingsTestContext, TestContext } from '../../../helpers/test-scenarios.js';
describe('Recording API Tests', () => {
let context: TestContext | null = null;

View File

@ -5,15 +5,15 @@ import {
disconnectFakeParticipants,
getAllRecordings,
startTestServer
} from '../../../utils/helpers.js';
} from '../../../helpers/request-helpers.js';
import {
expectValidationError,
expectSuccessListRecordingResponse,
expectValidRecordingWithFields,
expectValidRecording
} from '../../../utils/assertion-helpers.js';
import { RoomData, setupMultiRecordingsTestContext, TestContext } from '../../../utils/test-scenarios.js';
} from '../../../helpers/assertion-helpers.js';
import { RoomData, setupMultiRecordingsTestContext, TestContext } from '../../../helpers/test-scenarios.js';
import { MeetRoom } from '../../../../src/typings/ce/room.js';
import { MeetRecordingInfo, MeetRecordingStatus } from '../../../../src/typings/ce/recording.model.js';

View File

@ -9,7 +9,7 @@ import {
startTestServer,
stopAllRecordings,
stopRecording
} from '../../../utils/helpers.js';
} from '../../../helpers/request-helpers.js';
import { errorRoomNotFound } from '../../../../src/models/error.model.js';
import { MeetRoom } from '../../../../src/typings/ce/room.js';
@ -18,8 +18,8 @@ import {
expectValidRecordingLocationHeader,
expectValidStartRecordingResponse,
expectValidStopRecordingResponse
} from '../../../utils/assertion-helpers.js';
import { setupMultiRoomTestContext, TestContext } from '../../../utils/test-scenarios.js';
} from '../../../helpers/assertion-helpers.js';
import { setupMultiRoomTestContext, TestContext } from '../../../helpers/test-scenarios.js';
describe('Recording API Tests', () => {
let context: TestContext | null = null;

View File

@ -1,5 +1,5 @@
import { describe, it, expect, beforeAll, afterAll } from '@jest/globals';
import { expectValidStopRecordingResponse, expectErrorResponse } from '../../../utils/assertion-helpers';
import { expectValidStopRecordingResponse, expectErrorResponse } from '../../../helpers/assertion-helpers';
import {
startRecording,
disconnectFakeParticipants,
@ -8,9 +8,9 @@ import {
deleteAllRecordings,
deleteAllRooms,
startTestServer
} from '../../../utils/helpers';
} from '../../../helpers/request-helpers';
import { MeetRoom } from '../../../../src/typings/ce';
import { setupMultiRoomTestContext, TestContext } from '../../../utils/test-scenarios';
import { setupMultiRoomTestContext, TestContext } from '../../../helpers/test-scenarios';
describe('Recording API Tests', () => {
let context: TestContext | null = null;

View File

@ -7,7 +7,7 @@ import {
getRoom,
joinFakeParticipant,
startTestServer
} from '../../../utils/helpers.js';
} from '../../../helpers/request-helpers.js';
describe('Room API Tests', () => {
beforeAll(() => {

View File

@ -4,8 +4,8 @@ import ms from 'ms';
import request from 'supertest';
import INTERNAL_CONFIG from '../../../../src/config/internal-config.js';
import { MeetRecordingAccess, UserRole } from '../../../../src/typings/ce/index.js';
import { expectValidRoom } from '../../../utils/assertion-helpers.js';
import { createRoom, deleteAllRooms, loginUserAsRole, startTestServer } from '../../../utils/helpers.js';
import { expectValidRoom } from '../../../helpers/assertion-helpers.js';
import { createRoom, deleteAllRooms, loginUserAsRole, startTestServer } from '../../../helpers/request-helpers.js';
const ROOMS_PATH = `${INTERNAL_CONFIG.API_BASE_PATH_V1}/rooms`;

View File

@ -1,6 +1,6 @@
import { afterEach, beforeAll, describe, expect, it } from '@jest/globals';
import ms from 'ms';
import { expectValidRoom } from '../../../utils/assertion-helpers.js';
import { expectValidRoom } from '../../../helpers/assertion-helpers.js';
import {
createRoom,
deleteAllRooms,
@ -10,7 +10,7 @@ import {
joinFakeParticipant,
sleep,
startTestServer
} from '../../../utils/helpers.js';
} from '../../../helpers/request-helpers.js';
describe('Room API Tests', () => {
beforeAll(() => {

View File

@ -11,7 +11,7 @@ import {
runRoomGarbageCollector,
sleep,
startTestServer
} from '../../../utils/helpers.js';
} from '../../../helpers/request-helpers.js';
describe('Room Garbage Collector Tests', () => {
beforeAll(() => {

View File

@ -6,8 +6,8 @@ import {
expectValidationError,
expectValidRoom,
expectValidRoomWithFields
} from '../../../utils/assertion-helpers.js';
import { createRoom, deleteAllRooms, getRoom, startTestServer } from '../../../utils/helpers.js';
} from '../../../helpers/assertion-helpers.js';
import { createRoom, deleteAllRooms, getRoom, startTestServer } from '../../../helpers/request-helpers.js';
describe('Room API Tests', () => {
beforeAll(() => {

View File

@ -6,8 +6,8 @@ import {
expectValidationError,
expectValidRoom,
expectValidRoomWithFields
} from '../../../utils/assertion-helpers.js';
import { createRoom, deleteAllRooms, getRooms, startTestServer } from '../../../utils/helpers.js';
} from '../../../helpers/assertion-helpers.js';
import { createRoom, deleteAllRooms, getRooms, startTestServer } from '../../../helpers/request-helpers.js';
describe('Room API Tests', () => {
const validAutoDeletionDate = Date.now() + ms('2h');

View File

@ -1,6 +1,6 @@
import { afterEach, beforeAll, describe, expect, it } from '@jest/globals';
import { MeetRecordingAccess } from '../../../../src/typings/ce/index.js';
import { createRoom, deleteAllRooms, getRoom, startTestServer, updateRoomPreferences } from '../../../utils/helpers.js';
import { createRoom, deleteAllRooms, getRoom, startTestServer, updateRoomPreferences } from '../../../helpers/request-helpers.js';
describe('Room API Tests', () => {
beforeAll(() => {

View File

@ -3,7 +3,7 @@ import { Express } from 'express';
import request from 'supertest';
import INTERNAL_CONFIG from '../../../../src/config/internal-config.js';
import { UserRole } from '../../../../src/typings/ce/index.js';
import { loginUserAsRole, startTestServer } from '../../../utils/helpers.js';
import { loginUserAsRole, startTestServer } from '../../../helpers/request-helpers.js';
const AUTH_PATH = `${INTERNAL_CONFIG.INTERNAL_API_BASE_PATH_V1}/auth`;

View File

@ -10,7 +10,7 @@ import {
generateParticipantToken,
loginUserAsRole,
startTestServer
} from '../../../utils/helpers.js';
} from '../../../helpers/request-helpers.js';
const MEETINGS_PATH = `${INTERNAL_CONFIG.INTERNAL_API_BASE_PATH_V1}/meetings`;

View File

@ -10,7 +10,7 @@ import {
deleteAllRooms,
loginUserAsRole,
startTestServer
} from '../../../utils/helpers.js';
} from '../../../helpers/request-helpers.js';
const PARTICIPANTS_PATH = `${INTERNAL_CONFIG.INTERNAL_API_BASE_PATH_V1}/participants`;

View File

@ -11,7 +11,7 @@ import {
generateParticipantToken,
loginUserAsRole,
startTestServer
} from '../../../utils/helpers.js';
} from '../../../helpers/request-helpers.js';
const RECORDINGS_PATH = `${INTERNAL_CONFIG.API_BASE_PATH_V1}/recordings`;
const INTERNAL_RECORDINGS_PATH = `${INTERNAL_CONFIG.INTERNAL_API_BASE_PATH_V1}/recordings`;

View File

@ -12,7 +12,7 @@ import {
generateParticipantToken,
loginUserAsRole,
startTestServer
} from '../../../utils/helpers.js';
} from '../../../helpers/request-helpers.js';
const ROOMS_PATH = `${INTERNAL_CONFIG.API_BASE_PATH_V1}/rooms`;
const INTERNAL_ROOMS_PATH = `${INTERNAL_CONFIG.INTERNAL_API_BASE_PATH_V1}/rooms`;