Angular src restructured as modular as per angular official guidelines, .travis.yml support added for node 12

This commit is contained in:
Arun Redhu
2019-06-11 00:15:05 +05:30
parent 956381cd74
commit 598370377a
26 changed files with 184 additions and 63 deletions

View File

@@ -0,0 +1,33 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { HomeComponent } from './home.component';
import { TranslateModule } from '@ngx-translate/core';
describe('HomeComponent', () => {
let component: HomeComponent;
let fixture: ComponentFixture<HomeComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [HomeComponent],
imports: [TranslateModule.forRoot()]
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(HomeComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
it('should render title in a h1 tag', async(() => {
const compiled = fixture.debugElement.nativeElement;
expect(compiled.querySelector('h1').textContent).toContain(
'PAGES.HOME.TITLE'
);
}));
});