Permalink
Browse files

Add test for backwards compatibility for Animation object

Signed-off-by: Niels van Hoorn <nvh@nvh.io>
  • Loading branch information...
nvh committed Sep 15, 2016
1 parent eac0aa8 commit 6c644c561ed0a19dc1ed05d7b8ebcdda52e9e757
Showing with 15 additions and 0 deletions.
  1. +15 −0 test/tests/LayerAnimationTest.coffee
@@ -579,3 +579,18 @@ describe "LayerAnimation", ->
@layer.x.should.equal 100
calledEvents.should.eql(["start", "end", "stop"])
+ describe "Backwards compatibility", ->
+ it "Should still support deprecated API", (done) ->
+ layer = new Layer()
+
+ animation = new Animation
+ layer: layer
+ properties:
+ x:50
+ curve: "linear"
+ time: 0.1
+
+ animation.start()
+ Utils.delay animation.options.time, ->
+ layer.x.should.equal 50
+ done()

0 comments on commit 6c644c5

Please sign in to comment.