mirror of
https://github.com/unraid/api.git
synced 2026-01-01 22:20:05 -06:00
fix: unit test failure
This commit is contained in:
@@ -1,12 +1,19 @@
|
||||
import { Test, type TestingModule } from '@nestjs/testing';
|
||||
import { AuthService } from './auth.service';
|
||||
import { UsersService } from '@app/unraid-api/auth/users.service';
|
||||
import { CookieService } from '@app/unraid-api/auth/cookie.service';
|
||||
|
||||
describe('AuthService', () => {
|
||||
let service: AuthService;
|
||||
|
||||
beforeEach(async () => {
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
providers: [AuthService],
|
||||
providers: [
|
||||
AuthService,
|
||||
{ provide: 'USERS_SERVICE', useClass: UsersService },
|
||||
{ provide: 'COOKIE_SERVICE', useClass: CookieService },
|
||||
{ provide: 'SESSION_COOKIE_CONFIG', useValue: { name: 'session' } },
|
||||
],
|
||||
}).compile();
|
||||
|
||||
service = module.get<AuthService>(AuthService);
|
||||
|
||||
Reference in New Issue
Block a user