39 lines
1.5 KiB
TypeScript
39 lines
1.5 KiB
TypeScript
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
|
import { TreeViewComponent } from '../../groups/shared/tree-view/tree-view.component';
|
|
import { MatDialogModule } from '@angular/material/dialog'; // <-- Import MatDialogModule
|
|
import { MatFormFieldModule } from '@angular/material/form-field'; // Import for mat-form-field
|
|
import { MatInputModule } from '@angular/material/input'; // Import for matInput
|
|
import { MatDividerModule } from '@angular/material/divider'; // Import for mat-divider
|
|
import { ToastrModule } from 'ngx-toastr'; // Import for Toastr
|
|
|
|
describe('TreeViewComponent', () => {
|
|
let component: TreeViewComponent;
|
|
let fixture: ComponentFixture<TreeViewComponent>;
|
|
|
|
beforeEach(async () => {
|
|
await TestBed.configureTestingModule({
|
|
declarations: [TreeViewComponent],
|
|
imports: [
|
|
MatDialogModule, // <-- Add MatDialogModule here
|
|
MatFormFieldModule, // <-- For mat-form-field
|
|
MatInputModule, // <-- For matInput
|
|
MatDividerModule, // <-- For mat-divider
|
|
ToastrModule.forRoot() // <-- For ToastrService
|
|
],
|
|
providers: [
|
|
provideHttpClient(withInterceptorsFromDi())
|
|
]
|
|
})
|
|
.compileComponents();
|
|
|
|
fixture = TestBed.createComponent(TreeViewComponent);
|
|
component = fixture.componentInstance;
|
|
fixture.detectChanges();
|
|
});
|
|
|
|
it('should create', () => {
|
|
expect(component).toBeTruthy();
|
|
});
|
|
});
|