Matteo Scandolo | d819c92 | 2016-12-02 14:06:14 -0800 | [diff] [blame^] | 1 | /// <reference path="../../typings/index.d.ts"/> |
| 2 | |
| 3 | import {HelloComponent} from './hello'; |
| 4 | import {TestBed, async} from '@angular/core/testing'; |
| 5 | |
| 6 | describe('hello component', () => { |
| 7 | beforeEach(async(() => { |
| 8 | TestBed.configureTestingModule({ |
| 9 | declarations: [ |
| 10 | HelloComponent |
| 11 | ] |
| 12 | }); |
| 13 | TestBed.compileComponents(); |
| 14 | })); |
| 15 | |
| 16 | it('should render hello world', () => { |
| 17 | const fixture = TestBed.createComponent(HelloComponent); |
| 18 | fixture.detectChanges(); |
| 19 | const hello = fixture.nativeElement; |
| 20 | expect(hello.querySelector('h1').textContent).toBe('Hello World!'); |
| 21 | }); |
| 22 | }); |