tests: Renamed utils directory to helpers
This commit is contained in:
parent
473531792e
commit
b98d4d0cd9
@ -7,7 +7,7 @@ import {
|
|||||||
sleep,
|
sleep,
|
||||||
startRecording,
|
startRecording,
|
||||||
stopRecording
|
stopRecording
|
||||||
} from './helpers';
|
} from './request-helpers';
|
||||||
|
|
||||||
import ms, { StringValue } from 'ms';
|
import ms, { StringValue } from 'ms';
|
||||||
import { MeetRoom, UserRole } from '../../src/typings/ce';
|
import { MeetRoom, UserRole } from '../../src/typings/ce';
|
||||||
@ -1,7 +1,7 @@
|
|||||||
import { afterAll, beforeAll, describe, expect, it } from '@jest/globals';
|
import { afterAll, beforeAll, describe, expect, it } from '@jest/globals';
|
||||||
import { container } from '../../../../src/config';
|
import { container } from '../../../../src/config';
|
||||||
import { MeetStorageService } from '../../../../src/services';
|
import { MeetStorageService } from '../../../../src/services';
|
||||||
import { expectValidationError, expectValidStartRecordingResponse } from '../../../utils/assertion-helpers';
|
import { expectValidationError, expectValidStartRecordingResponse } from '../../../helpers/assertion-helpers';
|
||||||
import {
|
import {
|
||||||
bulkDeleteRecordings,
|
bulkDeleteRecordings,
|
||||||
deleteAllRecordings,
|
deleteAllRecordings,
|
||||||
@ -9,8 +9,8 @@ import {
|
|||||||
startRecording,
|
startRecording,
|
||||||
startTestServer,
|
startTestServer,
|
||||||
stopRecording
|
stopRecording
|
||||||
} from '../../../utils/helpers';
|
} from '../../../helpers/request-helpers';
|
||||||
import { setupMultiRecordingsTestContext } from '../../../utils/test-scenarios';
|
import { setupMultiRecordingsTestContext } from '../../../helpers/test-scenarios';
|
||||||
|
|
||||||
describe('Recording API Tests', () => {
|
describe('Recording API Tests', () => {
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { afterAll, beforeAll, beforeEach, describe, expect, it } from '@jest/globals';
|
import { afterAll, beforeAll, beforeEach, describe, expect, it } from '@jest/globals';
|
||||||
import { container } from '../../../../src/config';
|
import { container } from '../../../../src/config';
|
||||||
import { MeetStorageService } from '../../../../src/services';
|
import { MeetStorageService } from '../../../../src/services';
|
||||||
import { expectValidationError, expectValidStartRecordingResponse } from '../../../utils/assertion-helpers';
|
import { expectValidationError, expectValidStartRecordingResponse } from '../../../helpers/assertion-helpers';
|
||||||
import {
|
import {
|
||||||
deleteAllRecordings,
|
deleteAllRecordings,
|
||||||
deleteAllRooms,
|
deleteAllRooms,
|
||||||
@ -10,8 +10,8 @@ import {
|
|||||||
startTestServer,
|
startTestServer,
|
||||||
stopAllRecordings,
|
stopAllRecordings,
|
||||||
stopRecording
|
stopRecording
|
||||||
} from '../../../utils/helpers';
|
} from '../../../helpers/request-helpers';
|
||||||
import { setupMultiRecordingsTestContext } from '../../../utils/test-scenarios';
|
import { setupMultiRecordingsTestContext } from '../../../helpers/test-scenarios';
|
||||||
import { MeetRoom } from '../../../../src/typings/ce';
|
import { MeetRoom } from '../../../../src/typings/ce';
|
||||||
|
|
||||||
describe('Recording API Tests', () => {
|
describe('Recording API Tests', () => {
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { afterAll, beforeAll, describe, expect, it } from '@jest/globals';
|
import { afterAll, beforeAll, describe, expect, it } from '@jest/globals';
|
||||||
import { expectSuccessRecordingMediaResponse, expectValidationError } from '../../../utils/assertion-helpers';
|
import { expectSuccessRecordingMediaResponse, expectValidationError } from '../../../helpers/assertion-helpers';
|
||||||
import {
|
import {
|
||||||
deleteAllRecordings,
|
deleteAllRecordings,
|
||||||
deleteAllRooms,
|
deleteAllRooms,
|
||||||
@ -7,8 +7,8 @@ import {
|
|||||||
startTestServer,
|
startTestServer,
|
||||||
stopAllRecordings,
|
stopAllRecordings,
|
||||||
stopRecording
|
stopRecording
|
||||||
} from '../../../utils/helpers';
|
} from '../../../helpers/request-helpers';
|
||||||
import { setupMultiRecordingsTestContext } from '../../../utils/test-scenarios';
|
import { setupMultiRecordingsTestContext } from '../../../helpers/test-scenarios';
|
||||||
import { MeetRoom } from '../../../../src/typings/ce';
|
import { MeetRoom } from '../../../../src/typings/ce';
|
||||||
|
|
||||||
describe('Recording API Tests', () => {
|
describe('Recording API Tests', () => {
|
||||||
|
|||||||
@ -6,13 +6,13 @@ import {
|
|||||||
getRecording,
|
getRecording,
|
||||||
startTestServer,
|
startTestServer,
|
||||||
stopAllRecordings
|
stopAllRecordings
|
||||||
} from '../../../utils/helpers.js';
|
} from '../../../helpers/request-helpers.js';
|
||||||
|
|
||||||
import { errorRecordingNotFound } from '../../../../src/models/error.model.js';
|
import { errorRecordingNotFound } from '../../../../src/models/error.model.js';
|
||||||
import { MeetRecordingStatus } from '../../../../src/typings/ce/recording.model.js';
|
import { MeetRecordingStatus } from '../../../../src/typings/ce/recording.model.js';
|
||||||
import { MeetRoom } from '../../../../src/typings/ce/room.js';
|
import { MeetRoom } from '../../../../src/typings/ce/room.js';
|
||||||
import { expectValidationError, expectValidGetRecordingResponse } from '../../../utils/assertion-helpers.js';
|
import { expectValidationError, expectValidGetRecordingResponse } from '../../../helpers/assertion-helpers.js';
|
||||||
import { setupMultiRecordingsTestContext, TestContext } from '../../../utils/test-scenarios.js';
|
import { setupMultiRecordingsTestContext, TestContext } from '../../../helpers/test-scenarios.js';
|
||||||
|
|
||||||
describe('Recording API Tests', () => {
|
describe('Recording API Tests', () => {
|
||||||
let context: TestContext | null = null;
|
let context: TestContext | null = null;
|
||||||
|
|||||||
@ -5,15 +5,15 @@ import {
|
|||||||
disconnectFakeParticipants,
|
disconnectFakeParticipants,
|
||||||
getAllRecordings,
|
getAllRecordings,
|
||||||
startTestServer
|
startTestServer
|
||||||
} from '../../../utils/helpers.js';
|
} from '../../../helpers/request-helpers.js';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
expectValidationError,
|
expectValidationError,
|
||||||
expectSuccessListRecordingResponse,
|
expectSuccessListRecordingResponse,
|
||||||
expectValidRecordingWithFields,
|
expectValidRecordingWithFields,
|
||||||
expectValidRecording
|
expectValidRecording
|
||||||
} from '../../../utils/assertion-helpers.js';
|
} from '../../../helpers/assertion-helpers.js';
|
||||||
import { RoomData, setupMultiRecordingsTestContext, TestContext } from '../../../utils/test-scenarios.js';
|
import { RoomData, setupMultiRecordingsTestContext, TestContext } from '../../../helpers/test-scenarios.js';
|
||||||
import { MeetRoom } from '../../../../src/typings/ce/room.js';
|
import { MeetRoom } from '../../../../src/typings/ce/room.js';
|
||||||
import { MeetRecordingInfo, MeetRecordingStatus } from '../../../../src/typings/ce/recording.model.js';
|
import { MeetRecordingInfo, MeetRecordingStatus } from '../../../../src/typings/ce/recording.model.js';
|
||||||
|
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import {
|
|||||||
startTestServer,
|
startTestServer,
|
||||||
stopAllRecordings,
|
stopAllRecordings,
|
||||||
stopRecording
|
stopRecording
|
||||||
} from '../../../utils/helpers.js';
|
} from '../../../helpers/request-helpers.js';
|
||||||
|
|
||||||
import { errorRoomNotFound } from '../../../../src/models/error.model.js';
|
import { errorRoomNotFound } from '../../../../src/models/error.model.js';
|
||||||
import { MeetRoom } from '../../../../src/typings/ce/room.js';
|
import { MeetRoom } from '../../../../src/typings/ce/room.js';
|
||||||
@ -18,8 +18,8 @@ import {
|
|||||||
expectValidRecordingLocationHeader,
|
expectValidRecordingLocationHeader,
|
||||||
expectValidStartRecordingResponse,
|
expectValidStartRecordingResponse,
|
||||||
expectValidStopRecordingResponse
|
expectValidStopRecordingResponse
|
||||||
} from '../../../utils/assertion-helpers.js';
|
} from '../../../helpers/assertion-helpers.js';
|
||||||
import { setupMultiRoomTestContext, TestContext } from '../../../utils/test-scenarios.js';
|
import { setupMultiRoomTestContext, TestContext } from '../../../helpers/test-scenarios.js';
|
||||||
|
|
||||||
describe('Recording API Tests', () => {
|
describe('Recording API Tests', () => {
|
||||||
let context: TestContext | null = null;
|
let context: TestContext | null = null;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { describe, it, expect, beforeAll, afterAll } from '@jest/globals';
|
import { describe, it, expect, beforeAll, afterAll } from '@jest/globals';
|
||||||
import { expectValidStopRecordingResponse, expectErrorResponse } from '../../../utils/assertion-helpers';
|
import { expectValidStopRecordingResponse, expectErrorResponse } from '../../../helpers/assertion-helpers';
|
||||||
import {
|
import {
|
||||||
startRecording,
|
startRecording,
|
||||||
disconnectFakeParticipants,
|
disconnectFakeParticipants,
|
||||||
@ -8,9 +8,9 @@ import {
|
|||||||
deleteAllRecordings,
|
deleteAllRecordings,
|
||||||
deleteAllRooms,
|
deleteAllRooms,
|
||||||
startTestServer
|
startTestServer
|
||||||
} from '../../../utils/helpers';
|
} from '../../../helpers/request-helpers';
|
||||||
import { MeetRoom } from '../../../../src/typings/ce';
|
import { MeetRoom } from '../../../../src/typings/ce';
|
||||||
import { setupMultiRoomTestContext, TestContext } from '../../../utils/test-scenarios';
|
import { setupMultiRoomTestContext, TestContext } from '../../../helpers/test-scenarios';
|
||||||
|
|
||||||
describe('Recording API Tests', () => {
|
describe('Recording API Tests', () => {
|
||||||
let context: TestContext | null = null;
|
let context: TestContext | null = null;
|
||||||
|
|||||||
@ -7,7 +7,7 @@ import {
|
|||||||
getRoom,
|
getRoom,
|
||||||
joinFakeParticipant,
|
joinFakeParticipant,
|
||||||
startTestServer
|
startTestServer
|
||||||
} from '../../../utils/helpers.js';
|
} from '../../../helpers/request-helpers.js';
|
||||||
|
|
||||||
describe('Room API Tests', () => {
|
describe('Room API Tests', () => {
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
|
|||||||
@ -4,8 +4,8 @@ import ms from 'ms';
|
|||||||
import request from 'supertest';
|
import request from 'supertest';
|
||||||
import INTERNAL_CONFIG from '../../../../src/config/internal-config.js';
|
import INTERNAL_CONFIG from '../../../../src/config/internal-config.js';
|
||||||
import { MeetRecordingAccess, UserRole } from '../../../../src/typings/ce/index.js';
|
import { MeetRecordingAccess, UserRole } from '../../../../src/typings/ce/index.js';
|
||||||
import { expectValidRoom } from '../../../utils/assertion-helpers.js';
|
import { expectValidRoom } from '../../../helpers/assertion-helpers.js';
|
||||||
import { createRoom, deleteAllRooms, loginUserAsRole, startTestServer } from '../../../utils/helpers.js';
|
import { createRoom, deleteAllRooms, loginUserAsRole, startTestServer } from '../../../helpers/request-helpers.js';
|
||||||
|
|
||||||
const ROOMS_PATH = `${INTERNAL_CONFIG.API_BASE_PATH_V1}/rooms`;
|
const ROOMS_PATH = `${INTERNAL_CONFIG.API_BASE_PATH_V1}/rooms`;
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { afterEach, beforeAll, describe, expect, it } from '@jest/globals';
|
import { afterEach, beforeAll, describe, expect, it } from '@jest/globals';
|
||||||
import ms from 'ms';
|
import ms from 'ms';
|
||||||
import { expectValidRoom } from '../../../utils/assertion-helpers.js';
|
import { expectValidRoom } from '../../../helpers/assertion-helpers.js';
|
||||||
import {
|
import {
|
||||||
createRoom,
|
createRoom,
|
||||||
deleteAllRooms,
|
deleteAllRooms,
|
||||||
@ -10,7 +10,7 @@ import {
|
|||||||
joinFakeParticipant,
|
joinFakeParticipant,
|
||||||
sleep,
|
sleep,
|
||||||
startTestServer
|
startTestServer
|
||||||
} from '../../../utils/helpers.js';
|
} from '../../../helpers/request-helpers.js';
|
||||||
|
|
||||||
describe('Room API Tests', () => {
|
describe('Room API Tests', () => {
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
|
|||||||
@ -11,7 +11,7 @@ import {
|
|||||||
runRoomGarbageCollector,
|
runRoomGarbageCollector,
|
||||||
sleep,
|
sleep,
|
||||||
startTestServer
|
startTestServer
|
||||||
} from '../../../utils/helpers.js';
|
} from '../../../helpers/request-helpers.js';
|
||||||
|
|
||||||
describe('Room Garbage Collector Tests', () => {
|
describe('Room Garbage Collector Tests', () => {
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
|
|||||||
@ -6,8 +6,8 @@ import {
|
|||||||
expectValidationError,
|
expectValidationError,
|
||||||
expectValidRoom,
|
expectValidRoom,
|
||||||
expectValidRoomWithFields
|
expectValidRoomWithFields
|
||||||
} from '../../../utils/assertion-helpers.js';
|
} from '../../../helpers/assertion-helpers.js';
|
||||||
import { createRoom, deleteAllRooms, getRoom, startTestServer } from '../../../utils/helpers.js';
|
import { createRoom, deleteAllRooms, getRoom, startTestServer } from '../../../helpers/request-helpers.js';
|
||||||
|
|
||||||
describe('Room API Tests', () => {
|
describe('Room API Tests', () => {
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
|
|||||||
@ -6,8 +6,8 @@ import {
|
|||||||
expectValidationError,
|
expectValidationError,
|
||||||
expectValidRoom,
|
expectValidRoom,
|
||||||
expectValidRoomWithFields
|
expectValidRoomWithFields
|
||||||
} from '../../../utils/assertion-helpers.js';
|
} from '../../../helpers/assertion-helpers.js';
|
||||||
import { createRoom, deleteAllRooms, getRooms, startTestServer } from '../../../utils/helpers.js';
|
import { createRoom, deleteAllRooms, getRooms, startTestServer } from '../../../helpers/request-helpers.js';
|
||||||
|
|
||||||
describe('Room API Tests', () => {
|
describe('Room API Tests', () => {
|
||||||
const validAutoDeletionDate = Date.now() + ms('2h');
|
const validAutoDeletionDate = Date.now() + ms('2h');
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { afterEach, beforeAll, describe, expect, it } from '@jest/globals';
|
import { afterEach, beforeAll, describe, expect, it } from '@jest/globals';
|
||||||
import { MeetRecordingAccess } from '../../../../src/typings/ce/index.js';
|
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', () => {
|
describe('Room API Tests', () => {
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
|
|||||||
@ -3,7 +3,7 @@ import { Express } from 'express';
|
|||||||
import request from 'supertest';
|
import request from 'supertest';
|
||||||
import INTERNAL_CONFIG from '../../../../src/config/internal-config.js';
|
import INTERNAL_CONFIG from '../../../../src/config/internal-config.js';
|
||||||
import { UserRole } from '../../../../src/typings/ce/index.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`;
|
const AUTH_PATH = `${INTERNAL_CONFIG.INTERNAL_API_BASE_PATH_V1}/auth`;
|
||||||
|
|
||||||
|
|||||||
@ -10,7 +10,7 @@ import {
|
|||||||
generateParticipantToken,
|
generateParticipantToken,
|
||||||
loginUserAsRole,
|
loginUserAsRole,
|
||||||
startTestServer
|
startTestServer
|
||||||
} from '../../../utils/helpers.js';
|
} from '../../../helpers/request-helpers.js';
|
||||||
|
|
||||||
const MEETINGS_PATH = `${INTERNAL_CONFIG.INTERNAL_API_BASE_PATH_V1}/meetings`;
|
const MEETINGS_PATH = `${INTERNAL_CONFIG.INTERNAL_API_BASE_PATH_V1}/meetings`;
|
||||||
|
|
||||||
|
|||||||
@ -10,7 +10,7 @@ import {
|
|||||||
deleteAllRooms,
|
deleteAllRooms,
|
||||||
loginUserAsRole,
|
loginUserAsRole,
|
||||||
startTestServer
|
startTestServer
|
||||||
} from '../../../utils/helpers.js';
|
} from '../../../helpers/request-helpers.js';
|
||||||
|
|
||||||
const PARTICIPANTS_PATH = `${INTERNAL_CONFIG.INTERNAL_API_BASE_PATH_V1}/participants`;
|
const PARTICIPANTS_PATH = `${INTERNAL_CONFIG.INTERNAL_API_BASE_PATH_V1}/participants`;
|
||||||
|
|
||||||
|
|||||||
@ -11,7 +11,7 @@ import {
|
|||||||
generateParticipantToken,
|
generateParticipantToken,
|
||||||
loginUserAsRole,
|
loginUserAsRole,
|
||||||
startTestServer
|
startTestServer
|
||||||
} from '../../../utils/helpers.js';
|
} from '../../../helpers/request-helpers.js';
|
||||||
|
|
||||||
const RECORDINGS_PATH = `${INTERNAL_CONFIG.API_BASE_PATH_V1}/recordings`;
|
const RECORDINGS_PATH = `${INTERNAL_CONFIG.API_BASE_PATH_V1}/recordings`;
|
||||||
const INTERNAL_RECORDINGS_PATH = `${INTERNAL_CONFIG.INTERNAL_API_BASE_PATH_V1}/recordings`;
|
const INTERNAL_RECORDINGS_PATH = `${INTERNAL_CONFIG.INTERNAL_API_BASE_PATH_V1}/recordings`;
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import {
|
|||||||
generateParticipantToken,
|
generateParticipantToken,
|
||||||
loginUserAsRole,
|
loginUserAsRole,
|
||||||
startTestServer
|
startTestServer
|
||||||
} from '../../../utils/helpers.js';
|
} from '../../../helpers/request-helpers.js';
|
||||||
|
|
||||||
const ROOMS_PATH = `${INTERNAL_CONFIG.API_BASE_PATH_V1}/rooms`;
|
const ROOMS_PATH = `${INTERNAL_CONFIG.API_BASE_PATH_V1}/rooms`;
|
||||||
const INTERNAL_ROOMS_PATH = `${INTERNAL_CONFIG.INTERNAL_API_BASE_PATH_V1}/rooms`;
|
const INTERNAL_ROOMS_PATH = `${INTERNAL_CONFIG.INTERNAL_API_BASE_PATH_V1}/rooms`;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user