clean unit test (#4890)

* promote use setupTestbed

* fix comment using right spy and remove deprecated moment method usage

* restore md icon file

* remove error translation log

* restore extension test
This commit is contained in:
Eugenio Romano
2019-07-02 16:00:58 +01:00
committed by GitHub
parent 87b80235a7
commit 0d6140be77
17 changed files with 208 additions and 226 deletions

View File

@@ -20,6 +20,7 @@ import { TestBed, ComponentFixture } from '@angular/core/testing';
import { ContextMenuModule } from './context-menu.module';
import { CoreModule } from '../core.module';
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
import { setupTestBed } from '../testing/setupTestBed';
@Component({
selector: 'adf-test-component',
@@ -78,18 +79,18 @@ describe('ContextMenuDirective', () => {
}
];
beforeEach(() => {
TestBed.configureTestingModule({
imports: [
CoreModule.forRoot(),
ContextMenuModule,
NoopAnimationsModule
],
declarations: [
TestComponent
]
});
setupTestBed({
imports: [
CoreModule.forRoot(),
ContextMenuModule,
NoopAnimationsModule
],
declarations: [
TestComponent
]
});
beforeEach(() => {
fixture = TestBed.createComponent(TestComponent);
fixture.componentInstance.actions = actions;
fixture.detectChanges();