@@ -36,30 +36,26 @@ describe('Ng1 StateBuilder', function() {
36
36
expect ( builtViews . a . controller ) . toEqualData ( config . a . controller ) ;
37
37
} ) ;
38
38
39
- it (
40
- 'should not allow a view config with both component and template keys' ,
41
- inject ( function ( $injector ) {
42
- const config = {
43
- name : 'foo' ,
44
- url : '/foo' ,
45
- template : '<h1>hey</h1>' ,
46
- controller : 'FooController' ,
47
- parent : parent ,
48
- } ;
49
- expect ( ( ) => builder . builder ( 'views' ) ( config ) ) . not . toThrow ( ) ;
50
- expect ( ( ) => builder . builder ( 'views' ) ( extend ( { component : 'fooComponent' } , config ) ) ) . toThrow ( ) ;
51
- expect ( ( ) => builder . builder ( 'views' ) ( extend ( { componentProvider : ( ) => 'fooComponent' } , config ) ) ) . toThrow ( ) ;
52
- expect ( ( ) => builder . builder ( 'views' ) ( extend ( { bindings : { } } , config ) ) ) . toThrow ( ) ;
53
- } )
54
- ) ;
39
+ it ( 'should not allow a view config with both component and template keys' , inject ( function ( $injector ) {
40
+ const config = {
41
+ name : 'foo' ,
42
+ url : '/foo' ,
43
+ template : '<h1>hey</h1>' ,
44
+ controller : 'FooController' ,
45
+ parent : parent ,
46
+ } ;
47
+ expect ( ( ) => builder . builder ( 'views' ) ( config ) ) . not . toThrow ( ) ;
48
+ expect ( ( ) => builder . builder ( 'views' ) ( extend ( { component : 'fooComponent' } , config ) ) ) . toThrow ( ) ;
49
+ expect ( ( ) => builder . builder ( 'views' ) ( extend ( { componentProvider : ( ) => 'fooComponent' } , config ) ) ) . toThrow ( ) ;
50
+ expect ( ( ) => builder . builder ( 'views' ) ( extend ( { bindings : { } } , config ) ) ) . toThrow ( ) ;
51
+ } ) ) ;
55
52
56
- it (
57
- 'should replace a resolve: string value with a function that injects the service of the same name' ,
58
- inject ( function ( $injector ) {
59
- const config = { resolve : { foo : 'bar' } } ;
60
- expect ( builder . builder ( 'resolvables' ) ) . toBeDefined ( ) ;
61
- const built : Resolvable [ ] = builder . builder ( 'resolvables' ) ( config ) ;
62
- expect ( built [ 0 ] . deps ) . toEqual ( [ 'bar' ] ) ;
63
- } )
64
- ) ;
53
+ it ( 'should replace a resolve: string value with a function that injects the service of the same name' , inject ( function (
54
+ $injector
55
+ ) {
56
+ const config = { resolve : { foo : 'bar' } } ;
57
+ expect ( builder . builder ( 'resolvables' ) ) . toBeDefined ( ) ;
58
+ const built : Resolvable [ ] = builder . builder ( 'resolvables' ) ( config ) ;
59
+ expect ( built [ 0 ] . deps ) . toEqual ( [ 'bar' ] ) ;
60
+ } ) ) ;
65
61
} ) ;
0 commit comments