Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e4b4477

Browse files
committedJan 17, 2020
tests: fix and add some missing tests
1 parent 0d494ba commit e4b4477

File tree

6 files changed

+127
-0
lines changed

6 files changed

+127
-0
lines changed
 
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2+
3+
import { AppAsideComponent } from './app-aside.component';
4+
5+
describe('AppAsideComponent', () => {
6+
let component: AppAsideComponent;
7+
let fixture: ComponentFixture<AppAsideComponent>;
8+
9+
beforeEach(async(() => {
10+
TestBed.configureTestingModule({
11+
declarations: [ AppAsideComponent ]
12+
})
13+
.compileComponents();
14+
}));
15+
16+
beforeEach(() => {
17+
fixture = TestBed.createComponent(AppAsideComponent);
18+
component = fixture.componentInstance;
19+
fixture.detectChanges();
20+
});
21+
22+
it('should create', () => {
23+
expect(component).toBeTruthy();
24+
});
25+
});
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { TestBed } from '@angular/core/testing';
2+
import { RouterTestingModule } from '@angular/router/testing';
3+
4+
import { AppBreadcrumbService } from './app-breadcrumb.service';
5+
6+
describe('AppBreadcrumbService', () => {
7+
let service: AppBreadcrumbService;
8+
9+
beforeEach(() => {
10+
TestBed.configureTestingModule({
11+
imports: [RouterTestingModule.withRoutes([])],
12+
});
13+
service = TestBed.inject(AppBreadcrumbService);
14+
});
15+
16+
it('should be created', () => {
17+
expect(service).toBeTruthy();
18+
});
19+
});
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2+
import { RouterTestingModule } from '@angular/router/testing';
3+
4+
import { CuiBreadcrumbComponent } from './cui-breadcrumb.component';
5+
6+
describe('CuiBreadcrumbComponent', () => {
7+
let component: CuiBreadcrumbComponent;
8+
let fixture: ComponentFixture<CuiBreadcrumbComponent>;
9+
10+
beforeEach(async(() => {
11+
TestBed.configureTestingModule({
12+
imports: [RouterTestingModule.withRoutes([])],
13+
declarations: [ CuiBreadcrumbComponent ]
14+
})
15+
.compileComponents();
16+
}));
17+
18+
beforeEach(() => {
19+
fixture = TestBed.createComponent(CuiBreadcrumbComponent);
20+
component = fixture.componentInstance;
21+
fixture.detectChanges();
22+
});
23+
24+
it('should create', () => {
25+
expect(component).toBeTruthy();
26+
});
27+
});
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2+
3+
import { AppFooterComponent } from './app-footer.component';
4+
5+
describe('AppAsideComponent', () => {
6+
let component: AppFooterComponent;
7+
let fixture: ComponentFixture<AppFooterComponent>;
8+
9+
beforeEach(async(() => {
10+
TestBed.configureTestingModule({
11+
declarations: [ AppFooterComponent ]
12+
})
13+
.compileComponents();
14+
}));
15+
16+
beforeEach(() => {
17+
fixture = TestBed.createComponent(AppFooterComponent);
18+
component = fixture.componentInstance;
19+
fixture.detectChanges();
20+
});
21+
22+
it('should create', () => {
23+
expect(component).toBeTruthy();
24+
});
25+
});
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2+
import { RouterTestingModule } from '@angular/router/testing';
3+
4+
import { AppHeaderComponent } from './app-header.component';
5+
import { AsideToggleDirective, SidebarToggleDirective } from '../shared/layout/layout.directive';
6+
7+
describe('AppAsideComponent', () => {
8+
let component: AppHeaderComponent;
9+
let fixture: ComponentFixture<AppHeaderComponent>;
10+
11+
beforeEach(async(() => {
12+
TestBed.configureTestingModule({
13+
imports: [RouterTestingModule.withRoutes([])],
14+
declarations: [ AppHeaderComponent, SidebarToggleDirective, AsideToggleDirective ]
15+
})
16+
.compileComponents();
17+
}));
18+
19+
beforeEach(() => {
20+
fixture = TestBed.createComponent(AppHeaderComponent);
21+
component = fixture.componentInstance;
22+
fixture.detectChanges();
23+
});
24+
25+
it('should create', () => {
26+
expect(component).toBeTruthy();
27+
});
28+
});

‎projects/coreui/angular/src/lib/sidebar/app-sidebar.component.spec.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2+
import { RouterTestingModule } from '@angular/router/testing';
3+
24
import { AppSidebarComponent } from './app-sidebar.component';
35

46
describe('AppSidebarComponent', () => {
@@ -7,6 +9,7 @@ describe('AppSidebarComponent', () => {
79

810
beforeEach(async(() => {
911
TestBed.configureTestingModule({
12+
imports: [RouterTestingModule.withRoutes([])],
1013
declarations: [ AppSidebarComponent ],
1114
})
1215
.compileComponents();

0 commit comments

Comments
 (0)
Please sign in to comment.