@@ -2100,28 +2100,26 @@ describe('$compile', function() {
2100
2100
2101
2101
it ( 'should work in jqLite and jQuery with jQuery.cleanData last patched by Angular' , runTest ) ;
2102
2102
2103
- if ( jQuery ) {
2104
- it ( 'should work with another library patching jQuery.cleanData after Angular' , function ( ) {
2105
- var cleanedCount = 0 ;
2106
- var currentCleanData = jqLite . cleanData ;
2107
- jqLite . cleanData = function ( elems ) {
2108
- cleanedCount += elems . length ;
2109
- // Don't return the output and explicitly pass only the first parameter
2110
- // so that we're sure we're not relying on either of them. jQuery UI patch
2111
- // behaves in this way.
2112
- currentCleanData ( elems ) ;
2113
- } ;
2103
+ it ( 'should work with another library patching jqLite/jQuery.cleanData after Angular' , function ( ) {
2104
+ var cleanedCount = 0 ;
2105
+ var currentCleanData = jqLite . cleanData ;
2106
+ jqLite . cleanData = function ( elems ) {
2107
+ cleanedCount += elems . length ;
2108
+ // Don't return the output and explicitly pass only the first parameter
2109
+ // so that we're sure we're not relying on either of them. jQuery UI patch
2110
+ // behaves in this way.
2111
+ currentCleanData ( elems ) ;
2112
+ } ;
2114
2113
2115
- runTest ( ) ;
2114
+ runTest ( ) ;
2116
2115
2117
- // The initial ng-repeat div is dumped after parsing hence we expect cleanData
2118
- // count to be one larger than size of the iterated array.
2119
- expect ( cleanedCount ) . toBe ( is . length + 1 ) ;
2116
+ // The initial ng-repeat div is dumped after parsing hence we expect cleanData
2117
+ // count to be one larger than size of the iterated array.
2118
+ expect ( cleanedCount ) . toBe ( is . length + 1 ) ;
2120
2119
2121
- // Restore the previous cleanData.
2122
- jqLite . cleanData = currentCleanData ;
2123
- } ) ;
2124
- }
2120
+ // Restore the previous cleanData.
2121
+ jqLite . cleanData = currentCleanData ;
2122
+ } ) ;
2125
2123
} ) ;
2126
2124
2127
2125
describe ( 'replace and not exactly one root element' , function ( ) {
@@ -8640,28 +8638,26 @@ describe('$compile', function() {
8640
8638
8641
8639
it ( 'should work without external libraries (except jQuery)' , testCleanup ) ;
8642
8640
8643
- if ( jQuery ) {
8644
- it ( 'should work with another library patching jQuery.cleanData after AngularJS' , function ( ) {
8645
- var cleanedCount = 0 ;
8646
- var currentCleanData = jqLite . cleanData ;
8647
- jqLite . cleanData = function ( elems ) {
8648
- cleanedCount += elems . length ;
8649
- // Don't return the output and explicitly pass only the first parameter
8650
- // so that we're sure we're not relying on either of them. jQuery UI patch
8651
- // behaves in this way.
8652
- currentCleanData ( elems ) ;
8653
- } ;
8641
+ it ( 'should work with another library patching jqLite/jQuery.cleanData after AngularJS' , function ( ) {
8642
+ var cleanedCount = 0 ;
8643
+ var currentCleanData = jqLite . cleanData ;
8644
+ jqLite . cleanData = function ( elems ) {
8645
+ cleanedCount += elems . length ;
8646
+ // Don't return the output and explicitly pass only the first parameter
8647
+ // so that we're sure we're not relying on either of them. jQuery UI patch
8648
+ // behaves in this way.
8649
+ currentCleanData ( elems ) ;
8650
+ } ;
8654
8651
8655
- testCleanup ( ) ;
8652
+ testCleanup ( ) ;
8656
8653
8657
- // The ng-repeat template is removed/cleaned (the +1)
8658
- // and each clone of the ng-repeat template is also removed (xs.length)
8659
- expect ( cleanedCount ) . toBe ( xs . length + 1 ) ;
8654
+ // The ng-repeat template is removed/cleaned (the +1)
8655
+ // and each clone of the ng-repeat template is also removed (xs.length)
8656
+ expect ( cleanedCount ) . toBe ( xs . length + 1 ) ;
8660
8657
8661
- // Restore the previous cleanData.
8662
- jqLite . cleanData = currentCleanData ;
8663
- } ) ;
8664
- }
8658
+ // Restore the previous cleanData.
8659
+ jqLite . cleanData = currentCleanData ;
8660
+ } ) ;
8665
8661
} ) ;
8666
8662
8667
8663
0 commit comments