@@ -423,8 +423,7 @@ describe('$compile', function() {
423
423
describe ( 'multiple directives per element' , function ( ) {
424
424
it ( 'should allow multiple directives per element' , inject ( function ( $compile , $rootScope , log ) {
425
425
element = $compile (
426
- '<span greet="angular" log="L" x-high-log="H" data-medium-log="M"></span>' )
427
- ( $rootScope ) ;
426
+ '<span greet="angular" log="L" x-high-log="H" data-medium-log="M"></span>' ) ( $rootScope ) ;
428
427
expect ( element . text ( ) ) . toEqual ( 'Hello angular' ) ;
429
428
expect ( log ) . toEqual ( 'L; M; H' ) ;
430
429
} ) ) ;
@@ -607,8 +606,7 @@ describe('$compile', function() {
607
606
describe ( 'priority' , function ( ) {
608
607
it ( 'should honor priority' , inject ( function ( $compile , $rootScope , log ) {
609
608
element = $compile (
610
- '<span log="L" x-high-log="H" data-medium-log="M"></span>' )
611
- ( $rootScope ) ;
609
+ '<span log="L" x-high-log="H" data-medium-log="M"></span>' ) ( $rootScope ) ;
612
610
expect ( log ) . toEqual ( 'L; M; H' ) ;
613
611
} ) ) ;
614
612
} ) ;
@@ -809,17 +807,15 @@ describe('$compile', function() {
809
807
810
808
811
809
it ( 'should compile template when replacing' , inject ( function ( $compile , $rootScope , log ) {
812
- element = $compile ( '<div><div replace medium-log>ignore</div><div>' )
813
- ( $rootScope ) ;
810
+ element = $compile ( '<div><div replace medium-log>ignore</div><div>' ) ( $rootScope ) ;
814
811
$rootScope . $digest ( ) ;
815
812
expect ( element . text ( ) ) . toEqual ( 'Replace!' ) ;
816
813
expect ( log ) . toEqual ( 'LOG; HIGH; MEDIUM' ) ;
817
814
} ) ) ;
818
815
819
816
820
817
it ( 'should compile template when appending' , inject ( function ( $compile , $rootScope , log ) {
821
- element = $compile ( '<div><div append medium-log>ignore</div><div>' )
822
- ( $rootScope ) ;
818
+ element = $compile ( '<div><div append medium-log>ignore</div><div>' ) ( $rootScope ) ;
823
819
$rootScope . $digest ( ) ;
824
820
expect ( element . text ( ) ) . toEqual ( 'Append!' ) ;
825
821
expect ( log ) . toEqual ( 'LOG; HIGH; MEDIUM' ) ;
@@ -828,8 +824,7 @@ describe('$compile', function() {
828
824
829
825
it ( 'should merge attributes including style attr' , inject ( function ( $compile , $rootScope ) {
830
826
element = $compile (
831
- '<div><div replace class="medium-log" style="height: 20px" ></div><div>' )
832
- ( $rootScope ) ;
827
+ '<div><div replace class="medium-log" style="height: 20px" ></div><div>' ) ( $rootScope ) ;
833
828
var div = element . find ( 'div' ) ;
834
829
expect ( div . hasClass ( 'medium-log' ) ) . toBe ( true ) ;
835
830
expect ( div . hasClass ( 'log' ) ) . toBe ( true ) ;
@@ -841,8 +836,7 @@ describe('$compile', function() {
841
836
842
837
it ( 'should not merge attributes if they are the same' , inject ( function ( $compile , $rootScope ) {
843
838
element = $compile (
844
- '<div><div nomerge class="medium-log" id="myid"></div><div>' )
845
- ( $rootScope ) ;
839
+ '<div><div nomerge class="medium-log" id="myid"></div><div>' ) ( $rootScope ) ;
846
840
var div = element . find ( 'div' ) ;
847
841
expect ( div . hasClass ( 'medium-log' ) ) . toBe ( true ) ;
848
842
expect ( div . hasClass ( 'log' ) ) . toBe ( true ) ;
@@ -4892,8 +4886,7 @@ describe('$compile', function() {
4892
4886
} ) ;
4893
4887
} ) ;
4894
4888
inject ( function ( log , $rootScope , $compile ) {
4895
- element = $compile ( '<div><div trans>T:{{x}}-{{$parent.$id}}-{{$id}}<span>;</span></div></div>' )
4896
- ( $rootScope ) ;
4889
+ element = $compile ( '<div><div trans>T:{{x}}-{{$parent.$id}}-{{$id}}<span>;</span></div></div>' ) ( $rootScope ) ;
4897
4890
$rootScope . x = 'root' ;
4898
4891
$rootScope . $apply ( ) ;
4899
4892
expect ( element . text ( ) ) . toEqual ( 'W:iso-1-2;T:root-2-3;' ) ;
@@ -5178,8 +5171,7 @@ describe('$compile', function() {
5178
5171
} ) ;
5179
5172
} ) ;
5180
5173
inject ( function ( log , $rootScope , $compile ) {
5181
- element = $compile ( '<div><div trans>T:{{$$transcluded}}</div></div>' )
5182
- ( $rootScope ) ;
5174
+ element = $compile ( '<div><div trans>T:{{$$transcluded}}</div></div>' ) ( $rootScope ) ;
5183
5175
$rootScope . $apply ( ) ;
5184
5176
expect ( jqLite ( element . find ( 'span' ) [ 0 ] ) . text ( ) ) . toEqual ( 'I:' ) ;
5185
5177
expect ( jqLite ( element . find ( 'span' ) [ 1 ] ) . text ( ) ) . toEqual ( 'T:true' ) ;
@@ -6010,8 +6002,7 @@ describe('$compile', function() {
6010
6002
} ) ;
6011
6003
} ) ;
6012
6004
inject ( function ( log , $rootScope , $compile ) {
6013
- element = $compile ( '<div><div high-log trans="text" log>{{$parent.$id}}-{{$id}};</div></div>' )
6014
- ( $rootScope ) ;
6005
+ element = $compile ( '<div><div high-log trans="text" log>{{$parent.$id}}-{{$id}};</div></div>' ) ( $rootScope ) ;
6015
6006
$rootScope . $apply ( ) ;
6016
6007
expect ( log ) . toEqual ( 'compile: <!-- trans: text -->; link; LOG; LOG; HIGH' ) ;
6017
6008
expect ( element . text ( ) ) . toEqual ( '1-2;1-3;' ) ;
0 commit comments