From 6e8bd786ba853613472f3864e48048a425c46823 Mon Sep 17 00:00:00 2001 From: Matias Niemelàˆ Date: Thu, 1 Aug 2013 22:17:10 -0400 Subject: fix(ngAnimate): remove compound JS selector animations --- test/ng/animateSpec.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'test/ng/animateSpec.js') diff --git a/test/ng/animateSpec.js b/test/ng/animateSpec.js index c5914a74..2e9034e4 100644 --- a/test/ng/animateSpec.js +++ b/test/ng/animateSpec.js @@ -1,9 +1,11 @@ describe("$animate", function() { describe("without animation", function() { - beforeEach(inject(function($compile, _$rootElement_, $rootScope) { - element = $compile('
')($rootScope); - $rootElement = _$rootElement_; + beforeEach(module(function() { + return function($compile, _$rootElement_, $rootScope) { + element = $compile('
')($rootScope); + $rootElement = _$rootElement_; + }; })); it("should add element at the start of enter animation", inject(function($animate, $compile, $rootScope) { @@ -37,5 +39,14 @@ describe("$animate", function() { $animate.addClass(element, 'ng-hide'); expect(element).toBeHidden(); })); + + it("should throw error on wrong selector", function() { + module(function($animateProvider) { + expect(function() { + $animateProvider.register('abc', null); + }).toThrow("[$animate:notcsel] Expecting class selector starting with '.' got 'abc'."); + }); + inject(); + }); }); }); -- cgit v1.2.3