mirror of
https://github.com/informaticker/discord-jellyfin-bot.git
synced 2024-11-25 02:51:57 +01:00
🚨 Fix build errors
This commit is contained in:
parent
49312412fb
commit
606c10ec6d
@ -1,3 +1,4 @@
|
||||
import { InjectionToken } from '@nestjs/common';
|
||||
import {
|
||||
HealthCheckResult,
|
||||
HealthCheckService,
|
||||
@ -42,10 +43,14 @@ describe('HealthController', () => {
|
||||
}
|
||||
|
||||
if (token === HealthCheckService) {
|
||||
return new HealthCheckService(new HealthCheckExecutor(), null, null);
|
||||
return new HealthCheckService(
|
||||
new HealthCheckExecutor(),
|
||||
{ getErrorMessage: jest.fn() },
|
||||
{ log: jest.fn(), error: jest.fn(), warn: jest.fn() },
|
||||
);
|
||||
}
|
||||
|
||||
return useDefaultMockerToken(token);
|
||||
return useDefaultMockerToken(token as InjectionToken);
|
||||
})
|
||||
.compile();
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { InjectionToken } from '@nestjs/common';
|
||||
import { HealthIndicatorResult } from '@nestjs/terminus';
|
||||
import { Test } from '@nestjs/testing';
|
||||
import { JellyfinService } from '../../clients/jellyfin/jellyfin.service';
|
||||
@ -16,7 +17,7 @@ describe('JellyfinHealthIndicator', () => {
|
||||
if (token === JellyfinService) {
|
||||
return { isConnected: jest.fn() };
|
||||
}
|
||||
return useDefaultMockerToken(token);
|
||||
return useDefaultMockerToken(token as InjectionToken);
|
||||
})
|
||||
.compile();
|
||||
|
||||
|
@ -6,6 +6,7 @@ import { DiscordMessageService } from '../clients/discord/discord.message.servic
|
||||
import { GithubRelease } from '../models/github-release';
|
||||
import { useDefaultMockerToken } from '../utils/tests/defaultMockerToken';
|
||||
import { UpdatesService } from './updates.service';
|
||||
import { InjectionToken } from '@nestjs/common';
|
||||
|
||||
// mock axios: https://stackoverflow.com/questions/51275434/type-of-axios-mock-using-jest-typescript/55351900#55351900
|
||||
jest.mock('axios');
|
||||
@ -49,7 +50,7 @@ describe('UpdatesService', () => {
|
||||
};
|
||||
}
|
||||
|
||||
return useDefaultMockerToken(token);
|
||||
return useDefaultMockerToken(token as InjectionToken);
|
||||
})
|
||||
.compile();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user