Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 732d72d

Browse files
committed
test(ngRepeat): move an existing test into the right describe block
1 parent 66103c8 commit 732d72d

File tree

1 file changed

+22
-21
lines changed

1 file changed

+22
-21
lines changed

test/ng/directive/ngRepeatSpec.js

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1332,6 +1332,28 @@ describe('ngRepeat and transcludes', function() {
13321332
dealoc(element);
13331333
});
13341334
});
1335+
1336+
1337+
it('should work with svg elements when the svg container is transcluded', function() {
1338+
module(function($compileProvider) {
1339+
$compileProvider.directive('svgContainer', function() {
1340+
return {
1341+
template: '<svg ng-transclude></svg>',
1342+
replace: true,
1343+
transclude: true
1344+
};
1345+
});
1346+
});
1347+
inject(function($compile, $rootScope) {
1348+
var element = $compile('<svg-container><circle ng-repeat="r in rows"></circle></svg-container>')($rootScope);
1349+
$rootScope.rows = [1];
1350+
$rootScope.$apply();
1351+
1352+
var circle = element.find('circle');
1353+
expect(circle[0].toString()).toMatch(/SVG/);
1354+
dealoc(element);
1355+
});
1356+
});
13351357
});
13361358

13371359
describe('ngRepeat animations', function() {
@@ -1464,25 +1486,4 @@ describe('ngRepeat animations', function() {
14641486
expect(item.element.text()).toBe('3');
14651487
})
14661488
);
1467-
1468-
it('should work with svg elements when the svg container is transcluded', function() {
1469-
module(function($compileProvider) {
1470-
$compileProvider.directive('svgContainer', function() {
1471-
return {
1472-
template: '<svg ng-transclude></svg>',
1473-
replace: true,
1474-
transclude: true
1475-
};
1476-
});
1477-
});
1478-
inject(function($compile, $rootScope) {
1479-
element = $compile('<svg-container><circle ng-repeat="r in rows"></circle></svg-container>')($rootScope);
1480-
$rootScope.rows = [1];
1481-
$rootScope.$apply();
1482-
1483-
var circle = element.find('circle');
1484-
expect(circle[0].toString()).toMatch(/SVG/);
1485-
});
1486-
});
1487-
14881489
});

0 commit comments

Comments
 (0)