-
Notifications
You must be signed in to change notification settings - Fork 13
/
new-simulation.component.spec.ts
40 lines (35 loc) · 1.42 KB
/
new-simulation.component.spec.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { NewSimulationComponent } from './new-simulation.component';
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { MatTableModule, MatDialogModule } from '@angular/material';
// TODO change this import to simply import the app-material module?
import { HttpClientModule, HttpClient } from '@angular/common/http';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { AlertComponent } from 'src/app/Components/alert/alert.component';
// TODO The alert component needs to be mocked !
// TODO this test causes the next test to fail due to missing alertcomponent factory
xdescribe('NewSimulationComponent', () => {
let component: NewSimulationComponent;
let fixture: ComponentFixture<NewSimulationComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [NewSimulationComponent],
imports: [
MatTableModule,
HttpClientModule,
MatDialogModule,
BrowserAnimationsModule,
],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
providers: [HttpClientModule, MatDialogModule],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(NewSimulationComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});