mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-24 03:55:49 +08:00
fix(ngAnimate): remove compound JS selector animations
This commit is contained in:
committed by
Misko Hevery
parent
4ed5fc90b9
commit
6e8bd786ba
@@ -1,9 +1,11 @@
|
||||
describe("$animate", function() {
|
||||
|
||||
describe("without animation", function() {
|
||||
beforeEach(inject(function($compile, _$rootElement_, $rootScope) {
|
||||
element = $compile('<div></div>')($rootScope);
|
||||
$rootElement = _$rootElement_;
|
||||
beforeEach(module(function() {
|
||||
return function($compile, _$rootElement_, $rootScope) {
|
||||
element = $compile('<div></div>')($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();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user