Permalink
Browse files

Adds a test for kapi.update.

  • Loading branch information...
jeremyckahn committed Jun 21, 2012
1 parent 5ba5f87 commit b426a1fce375c0bf7e792abd7642cfabd38f4102
Showing with 18 additions and 0 deletions.
  1. +18 −0 tests/test.kapi.html
View
@@ -301,6 +301,24 @@
});
+ module('update');
+
+
+ test('update causes the actor states to be recalculated', function () {
+
+ var testKapi = setupTestKapi();
+ var testActor = setupTestActor(testKapi);
+
+ testActor
+ .keyframe(0, { x: 0 })
+ .keyframe(1000, { x: 10 });
+
+ testKapi.update(500);
+
+ equals(testActor.get().x, 5, 'Midpoint of the actor was computed');
+ });
+
+
module('isPlaying');

0 comments on commit b426a1f

Please sign in to comment.