mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-31 07:08:40 -04:00
UnitTests: Add appConfigMock
This is necessary as the Logger needs this config for the loglevel. Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
parent
edc62285a2
commit
846bbeb390
4 changed files with 39 additions and 4 deletions
|
@ -11,6 +11,8 @@ import { Repository } from 'typeorm';
|
|||
import { Group } from './group.entity';
|
||||
import { NotInDBError } from '../errors/errors';
|
||||
import { LoggerModule } from '../logger/logger.module';
|
||||
import { ConfigModule } from '@nestjs/config';
|
||||
import appConfigMock from '../config/mock/app.config.mock';
|
||||
|
||||
describe('GroupsService', () => {
|
||||
let service: GroupsService;
|
||||
|
@ -26,7 +28,13 @@ describe('GroupsService', () => {
|
|||
useClass: Repository,
|
||||
},
|
||||
],
|
||||
imports: [LoggerModule],
|
||||
imports: [
|
||||
ConfigModule.forRoot({
|
||||
isGlobal: true,
|
||||
load: [appConfigMock],
|
||||
}),
|
||||
LoggerModule,
|
||||
],
|
||||
}).compile();
|
||||
|
||||
service = module.get<GroupsService>(GroupsService);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue