-
Notifications
You must be signed in to change notification settings - Fork 219
/
__material-simple._header.component.spec.ts
46 lines (41 loc) · 1.42 KB
/
__material-simple._header.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
41
42
43
44
45
46
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { TranslateModule } from '@ngx-translate/core';
import { RouterTestingModule } from '@angular/router/testing';
import { MaterialModule } from '@app/material.module';
import { I18nService } from '@app/core';
<% if (props.auth) { -%>
import { AuthenticationService, CredentialsService } from '@app/auth';
import { MockAuthenticationService } from '@app/auth/authentication.service.mock';
import { MockCredentialsService } from '@app/auth/credentials.service.mock';
<% } -%>
import { HeaderComponent } from './header.component';
describe('HeaderComponent', () => {
let component: HeaderComponent;
let fixture: ComponentFixture<HeaderComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
RouterTestingModule,
MaterialModule,
TranslateModule.forRoot()
],
declarations: [HeaderComponent],
providers: [
<% if (props.auth) { -%>
{ provide: AuthenticationService, useClass: MockAuthenticationService },
{ provide: CredentialsService, useClass: MockCredentialsService },
<% } -%>
I18nService
]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(HeaderComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});