UNPKG

generator-fountain-angular2

Version:

Yeoman Fountain generator to scaffold a webapp with Angular 2 written in ES6 (Babel), TypeScript through Webpack or SystemJS including tools Gulp 4, ESLint, Browsersync and Karma

21 lines (18 loc) 602 B
var TitleComponent = require('./title'); var ngTest = require('@angular/core/testing'); describe('title component', function () { beforeEach(ngTest.async(function () { ngTest.TestBed.configureTestingModule({ declarations: [ TitleComponent ] }); ngTest.TestBed.compileComponents(); })); it('should render \'Allo, \'Allo!', function () { var fixture = ngTest.TestBed.createComponent(TitleComponent); fixture.detectChanges(); var title = fixture.nativeElement; expect(title.querySelector('h1').textContent.trim()).toBe('\'Allo, \'Allo!'); }); });