fix: Fixed test units
This commit is contained in:
@@ -3,21 +3,36 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { UserEditComponent } from './user-edit.component';
|
||||
import { MAT_DIALOG_DATA, MatDialogModule, MatDialogRef } from '@angular/material/dialog';
|
||||
import { MatFormFieldModule } from '@angular/material/form-field';
|
||||
import { ReactiveFormsModule } from '@angular/forms';
|
||||
import { NG_VALUE_ACCESSOR, ReactiveFormsModule } from '@angular/forms';
|
||||
import { MatInputModule } from '@angular/material/input';
|
||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { AdminCommService } from '../../admin-comm.service';
|
||||
import { forwardRef } from '@angular/core';
|
||||
import { MatSelectModule } from '@angular/material/select';
|
||||
|
||||
describe('UserEditComponent', () => {
|
||||
let component: UserEditComponent;
|
||||
let fixture: ComponentFixture<UserEditComponent>;
|
||||
let acMock
|
||||
|
||||
beforeEach(async () => {
|
||||
acMock = {
|
||||
|
||||
}
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [UserEditComponent],
|
||||
imports: [MatDialogModule, MatFormFieldModule, ReactiveFormsModule, MatInputModule, BrowserAnimationsModule],
|
||||
imports: [
|
||||
MatDialogModule,
|
||||
MatFormFieldModule,
|
||||
ReactiveFormsModule,
|
||||
MatInputModule,
|
||||
NoopAnimationsModule,
|
||||
MatSelectModule
|
||||
],
|
||||
providers: [
|
||||
{provide: MatDialogRef, useValue: {}},
|
||||
{provide: MAT_DIALOG_DATA, useValue: {}}
|
||||
{ provide: MatDialogRef, useValue: {} },
|
||||
{ provide: MAT_DIALOG_DATA, useValue: { groups: [] } },
|
||||
{ provide: AdminCommService, useValue: acMock },
|
||||
]
|
||||
}).compileComponents();
|
||||
fixture = TestBed.createComponent(UserEditComponent);
|
||||
|
||||
Reference in New Issue
Block a user