22import { AppComponent } from './app.component' ;
33
44import {
5- it ,
6- iit ,
7- xit ,
8- describe ,
9- ddescribe ,
10- xdescribe ,
11- expect ,
12- fakeAsync ,
13- tick ,
14- beforeEach ,
15- inject ,
16- injectAsync ,
17- withProviders ,
18- beforeEachProviders ,
19- TestComponentBuilder
5+ expect , it , iit , xit ,
6+ describe , ddescribe , xdescribe ,
7+ beforeEach , beforeEachProviders , withProviders ,
8+ inject , injectAsync , fakeAsync , TestComponentBuilder , tick
209} from 'angular2/testing' ;
2110
2211import { provide } from 'angular2/core' ;
@@ -25,36 +14,36 @@ import { PromiseWrapper } from 'angular2/src/facade/promise';
2514
2615/////////// Module Preparation ///////////////////////
2716interface Done {
28- ( ) : void ;
29- fail : ( err : any ) => void ;
17+ ( ) : void ;
18+ fail : ( err : any ) => void ;
3019}
3120
3221//////// SPECS /////////////
3322
34- /// Delete thesVerify can use Angular testing's DOM abstraction to access DOM
35-
23+ /// Delete this: verify can use Angular testing's DOM abstraction to access DOM
3624describe ( 'Smoke test' , ( ) => {
3725 it ( 'should run a passing test' , ( ) => {
3826 expect ( true ) . toEqual ( true , 'should pass' ) ;
3927 } ) ;
4028} ) ;
4129
42- describe ( 'AppComponent' , function ( ) {
30+
31+ describe ( 'AppComponent' , function ( ) {
4332 it ( 'should instantiate component' ,
44- injectAsync ( [ TestComponentBuilder ] , ( tcb : TestComponentBuilder ) => {
33+ injectAsync ( [ TestComponentBuilder ] , ( tcb : TestComponentBuilder ) => {
4534
46- return tcb . createAsync ( AppComponent ) . then ( fixture => {
47- expect ( fixture . componentInstance instanceof AppComponent ) . toBe ( true , 'should create AppComponent' ) ;
48- } ) ;
49- } ) ) ;
35+ return tcb . createAsync ( AppComponent ) . then ( fixture => {
36+ expect ( fixture . componentInstance instanceof AppComponent ) . toBe ( true , 'should create AppComponent' ) ;
37+ } ) ;
38+ } ) ) ;
5039
5140 it ( 'should have expected <h1> text' ,
52- injectAsync ( [ TestComponentBuilder ] , ( tcb : TestComponentBuilder ) => {
53-
54- return tcb . createAsync ( AppComponent ) . then ( fixture => {
55- // fixture.detectChanges(); // need for a binding; we don't have one
56- let h1 = fixture . debugElement . query ( el => el . name === 'h1' ) . nativeElement ;
57- expect ( h1 . innerText ) . toMatch ( / a n g u l a r 2 a p p / i, '<h1> should say something about "Angular 2 App"' ) ;
58- } ) ;
59- } ) ) ;
41+ injectAsync ( [ TestComponentBuilder ] , ( tcb : TestComponentBuilder ) => {
42+
43+ return tcb . createAsync ( AppComponent ) . then ( fixture => {
44+ // fixture.detectChanges(); // need for a binding; we don't have one
45+ let h1 = fixture . debugElement . query ( el => el . name === 'h1' ) . nativeElement ;
46+ expect ( h1 . innerText ) . toMatch ( / a n g u l a r 2 a p p / i, '<h1> should say something about "Angular 2 App"' ) ;
47+ } ) ;
48+ } ) ) ;
6049} ) ;
0 commit comments