From 50bf029625d603fc652f0f413e709f43803743db Mon Sep 17 00:00:00 2001 From: Olivier Louvignes Date: Thu, 2 Jan 2014 12:26:43 +0100 Subject: [PATCH] fix(animate): remove trailing `s` --- src/ngAnimate/animate.js | 2 +- test/ngAnimate/animateSpec.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ngAnimate/animate.js b/src/ngAnimate/animate.js index 08c088e99de0..5f8dc67357dd 100644 --- a/src/ngAnimate/animate.js +++ b/src/ngAnimate/animate.js @@ -1141,7 +1141,7 @@ angular.module('ngAnimate', ['ng']) var propertyStyle = timings.transitionPropertyStyle; if(propertyStyle.indexOf('all') == -1) { style += CSS_PREFIX + 'transition-property: ' + propertyStyle + ';'; - style += CSS_PREFIX + 'transition-duration: ' + timings.transitionDurationStyle + 's;'; + style += CSS_PREFIX + 'transition-duration: ' + timings.transitionDurationStyle + ';'; appliedStyles.push(CSS_PREFIX + 'transition-property'); appliedStyles.push(CSS_PREFIX + 'transition-duration'); } diff --git a/test/ngAnimate/animateSpec.js b/test/ngAnimate/animateSpec.js index fedea535b658..15bb0f5cc548 100644 --- a/test/ngAnimate/animateSpec.js +++ b/test/ngAnimate/animateSpec.js @@ -1126,6 +1126,7 @@ describe("ngAnimate", function() { $rootScope.$digest(); $timeout.flush(); + expect(elements[0].attr('style')).toMatch(/transition-duration: 1\d*s,\s*3\d*s;/); expect(elements[0].attr('style')).not.toContain('transition-delay'); expect(elements[1].attr('style')).toMatch(/transition-delay: 2\.1\d*s,\s*4\.1\d*s/); expect(elements[2].attr('style')).toMatch(/transition-delay: 2\.2\d*s,\s*4\.2\d*s/);