Skip to content
Snippets Groups Projects
Commit fc2f3bc8 authored by Tianyi Liang's avatar Tianyi Liang
Browse files

[SD-235] fix tests

parent 1f2239a1
No related branches found
No related tags found
1 merge request!562Resolve SD-235 "Feat/ booth screen video"
import { HttpModule } from '@nestjs/axios'
import { Test, type TestingModule } from '@nestjs/testing'
import { getRepositoryToken } from '@nestjs/typeorm'
import { ConfigService } from 'core/config/config.service'
import { S3Library } from 'lib/aws/s3.library'
import { PeertubeLibrary } from 'lib/peertube/peertube.library'
import { ActivityLogService } from 'modules/activity-log/activity-log.service'
import { CompetitionsService } from 'modules/competitions/competitions/competitions.service'
import { TeamDeliverablesService } from 'modules/teams-management/deliverables/team-deliverables.service'
import { VideoSubmissionsService } from 'modules/teams-management/deliverables/video-submissions/video-submissions.service'
import { TeamsService } from 'modules/teams-management/teams/teams.service'
import { Video } from 'modules/videos/video.entity'
import { VideosJobQueue } from '../videos.job-queue'
import { VideosService } from '../videos.service'
......@@ -26,12 +32,39 @@ describe('VideosService', () => {
beforeAll(async () => {
const module: TestingModule = await Test.createTestingModule({
imports: [HttpModule],
providers: [
VideosService,
{
provide: ActivityLogService,
useValue: activityLogMock,
},
S3Library,
TeamsService,
{
provide: TeamsService,
useValue: {
getTeam: jest.fn(),
},
},
{
provide: CompetitionsService,
useValue: {
getCompetition: jest.fn(),
},
},
{
provide: TeamDeliverablesService,
useValue: {
getTeamDeliverable: jest.fn(),
},
},
{
provide: VideoSubmissionsService,
useValue: {
getVideoSubmission: jest.fn(),
},
},
{
provide: getRepositoryToken(Video),
useValue: repositoryMock,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment