mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
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:
@@ -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();
|
||||
|
Reference in New Issue
Block a user