test(aio): remove dross from NavMenuComponent spec
This commit is contained in:
parent
dfc81c3dab
commit
092f0df7a6
@ -1,26 +1,18 @@
|
|||||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||||
|
|
||||||
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
|
|
||||||
|
|
||||||
import { NavMenuComponent } from './nav-menu.component';
|
import { NavMenuComponent } from './nav-menu.component';
|
||||||
import { CurrentNode, NavigationService, NavigationViews, NavigationNode } from 'app/navigation/navigation.service';
|
|
||||||
|
|
||||||
|
|
||||||
describe('NavMenuComponent', () => {
|
describe('NavMenuComponent', () => {
|
||||||
let component: NavMenuComponent;
|
let component: NavMenuComponent;
|
||||||
let fixture: ComponentFixture<NavMenuComponent>;
|
let fixture: ComponentFixture<NavMenuComponent>;
|
||||||
|
|
||||||
beforeEach(async(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [ NavMenuComponent ],
|
declarations: [ NavMenuComponent ],
|
||||||
providers: [
|
|
||||||
{provide: NavigationService, useClass: TestNavigationService }
|
|
||||||
],
|
|
||||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
||||||
})
|
});
|
||||||
.compileComponents();
|
});
|
||||||
}));
|
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fixture = TestBed.createComponent(NavMenuComponent);
|
fixture = TestBed.createComponent(NavMenuComponent);
|
||||||
@ -31,23 +23,6 @@ describe('NavMenuComponent', () => {
|
|||||||
it('should create', () => {
|
it('should create', () => {
|
||||||
expect(component).toBeTruthy();
|
expect(component).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// TODO: Add TestHostComponent and tests.
|
||||||
});
|
});
|
||||||
|
|
||||||
//// Test Helpers ////
|
|
||||||
class TestNavigationService {
|
|
||||||
navJson = {
|
|
||||||
SideNav: [
|
|
||||||
{ title: 'a', children: [
|
|
||||||
{ url: 'b', title: 'b', children: [
|
|
||||||
{ url: 'c', title: 'c' },
|
|
||||||
{ url: 'd', title: 'd' }
|
|
||||||
] },
|
|
||||||
{ url: 'e', title: 'e' }
|
|
||||||
] },
|
|
||||||
{ url: 'f', title: 'f' }
|
|
||||||
]
|
|
||||||
};
|
|
||||||
|
|
||||||
navigationViews = new BehaviorSubject<NavigationViews>(this.navJson);
|
|
||||||
currentNode = new BehaviorSubject<CurrentNode>(undefined);
|
|
||||||
}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user