39 lines
989 B
TypeScript
39 lines
989 B
TypeScript
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
import { provideRouter } from '@angular/router';
|
|
import { Authorization } from '@services/authorization/authorization';
|
|
import { of } from 'rxjs';
|
|
import { vi } from 'vitest';
|
|
|
|
import { Login } from './login';
|
|
|
|
describe('Login', () => {
|
|
let component: Login;
|
|
let fixture: ComponentFixture<Login>;
|
|
|
|
beforeEach(async () => {
|
|
await TestBed.configureTestingModule({
|
|
imports: [Login],
|
|
providers: [
|
|
provideRouter([]),
|
|
{
|
|
provide: Authorization,
|
|
useValue: {
|
|
validateSession: vi.fn().mockReturnValue(of(null)),
|
|
login: vi.fn().mockReturnValue(of(null))
|
|
}
|
|
}
|
|
]
|
|
})
|
|
.compileComponents();
|
|
|
|
fixture = TestBed.createComponent(Login);
|
|
component = fixture.componentInstance;
|
|
fixture.detectChanges();
|
|
await fixture.whenStable();
|
|
});
|
|
|
|
it('should create', () => {
|
|
expect(component).toBeTruthy();
|
|
});
|
|
});
|