Permalink
Browse files

Optimizing test run speed by decreasing animation time

  • Loading branch information...
nvh committed Sep 8, 2017
1 parent 48e7b78 commit 9d9f59dfb342325b858bf3f853424108736cd29f
Showing with 5 additions and 13 deletions.
  1. +2 −0 test/tests.coffee
  2. +3 −9 test/tests/LayerAnimationTest.coffee
  3. +0 −4 test/tests/LayerTest.coffee
View
@@ -8,8 +8,10 @@ Framer.resetDefaults = ->
# We don't want to update all the tests if we change these
Framer.Defaults.Layer.width = 100
Framer.Defaults.Layer.height = 100
Framer.Defaults.Animation.time = 0.035
Framer.resetDefaults()
Framer.Device = new Framer.DeviceView()
window.TESTING = true
@@ -1,9 +1,9 @@
assert = require "assert"
AnimationTime = 0.001
AnimationTime = Framer.Defaults.Animation.time
AnimationProperties = ["x", "y", "midY", "rotation"]
describe "Animation Defaults", ->
describe "LayerAnimation", ->
it "should use defaults", ->
@@ -39,13 +39,7 @@ describe "Animation Defaults", ->
x: 50
animation.options.curve.should.equal Bezier.ease
animation.options.time.should.equal 1
describe "LayerAnimation", ->
before ->
Framer.Defaults.Animation.time = AnimationTime
after ->
Framer.resetDefaults()
animation.options.time.should.equal Framer.Defaults.Animation.time
describe "Properties", ->
@@ -797,8 +797,6 @@ describe "Layer", ->
l.animate
shadow1:
x: 20
options:
time: 0.2
l.onAnimationEnd ->
l.shadow1.x.should.equal 20
done()
@@ -810,8 +808,6 @@ describe "Layer", ->
l.animate
shadow1:
color: "blue"
options:
time: 0.2
l.onAnimationEnd ->
l.shadow1.color.toString().should.equal "rgb(0, 0, 255)"
done()

0 comments on commit 9d9f59d

Please sign in to comment.