Permalink
Browse files

Add test for animating to null

  • Loading branch information...
nvh committed Jul 22, 2016
1 parent 6d8b172 commit 7835f8257703af3d90a85d8427b78d898c3a6afe
Showing with 13 additions and 0 deletions.
  1. +13 −0 test/tests/LayerAnimationTest.coffee
@@ -1,3 +1,5 @@
+assert = require "assert"
+
AnimationTime = 0.05
AnimationProperties = ["x", "y", "midY", "rotation"]
@@ -145,6 +147,17 @@ describe "LayerAnimation", ->
layer.backgroundColor.toName().should.eql color
done()
+ it "should not animate non-animatable properties that are set to null", ->
+ layerA = new Layer
+ layerB = new Layer
+ parent: layerA
+ layerB.animateTo
+ parent: null
+ options:
+ instant: true
+ assert.equal(layerB.parent, null)
+
+
describe "Basic", ->
it "should stop", (done) ->

0 comments on commit 7835f82

Please sign in to comment.