fix: Fixed test units
This commit is contained in:
@@ -3,10 +3,16 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { AdminViewComponent } from './admin-view.component';
|
||||
import { MatToolbarModule } from '@angular/material/toolbar';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatSidenavModule } from '@angular/material/sidenav';
|
||||
import { MatDrawer, MatSidenavModule } from '@angular/material/sidenav';
|
||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { MatListModule } from '@angular/material/list';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { Component, Input } from '@angular/core';
|
||||
|
||||
@Component({selector: "app-toolbar", template: ''})
|
||||
class ToolbarMock {
|
||||
@Input() drawer!: MatDrawer;
|
||||
}
|
||||
|
||||
describe('AdminViewComponent', () => {
|
||||
let component: AdminViewComponent;
|
||||
@@ -14,7 +20,7 @@ describe('AdminViewComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [AdminViewComponent],
|
||||
declarations: [AdminViewComponent, ToolbarMock],
|
||||
imports: [MatToolbarModule, MatIconModule, MatSidenavModule, BrowserAnimationsModule, MatListModule, RouterModule.forRoot([])]
|
||||
});
|
||||
fixture = TestBed.createComponent(AdminViewComponent);
|
||||
|
||||
Reference in New Issue
Block a user