Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a849e26

Browse files
committedSep 29, 2014
test($compile): Update leak test with a stronger test
Update the test for the leak on asynchronous compilation on destroyed scopes with a stronger test
1 parent 7a29630 commit a849e26

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed
 

‎test/ng/compileSpec.js

+9-2
Original file line numberDiff line numberDiff line change
@@ -4552,6 +4552,13 @@ describe('$compile', function() {
45524552
$scope.code = 'blue';
45534553
});
45544554
});
4555+
$compileProvider.directive('isolateRed', function() {
4556+
return {
4557+
restrict: 'A',
4558+
scope: {},
4559+
template: '<div red></div>'
4560+
};
4561+
});
45554562
$compileProvider.directive('red', function() {
45564563
return {
45574564
restrict: 'A',
@@ -4568,7 +4575,7 @@ describe('$compile', function() {
45684575
'<div ng-controller="Leak">' +
45694576
'<div ng-switch="code">' +
45704577
'<div ng-switch-when="red">' +
4571-
'<div red></div>' +
4578+
'<div isolate-red></div>' +
45724579
'</div>' +
45734580
'</div>' +
45744581
'</div>');
@@ -5169,7 +5176,7 @@ describe('$compile', function() {
51695176
expect(countScopes($rootScope)).toEqual(1);
51705177
}));
51715178

5172-
it('should destroy mark as destroyed all sub scopes of the scope being destroyed',
5179+
it('should mark as destroyed all sub scopes of the scope being destroyed',
51735180
inject(function($compile, $rootScope) {
51745181

51755182
element = $compile(

0 commit comments

Comments
 (0)
This repository has been archived.