fix: unit test failure

This commit is contained in:
Eli Bosley
2024-10-25 23:44:55 -04:00
parent b8e61007e3
commit b9b8bbe871

View File

@@ -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);