From 5be36ca15a945ae9202e2d3558b3a8e3ba821199 Mon Sep 17 00:00:00 2001 From: Francisco Dans Date: Wed, 5 Aug 2015 12:49:02 +0200 Subject: [PATCH] now I'm using only non-legacy --- test/animator.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/test/animator.js b/test/animator.js index c5f3d49..69c3cf3 100644 --- a/test/animator.js +++ b/test/animator.js @@ -2,12 +2,13 @@ var torque = require('../lib/torque'); var sinon = require('sinon'); require('phantomjs-polyfill'); -asyncTest('time moves', function(assert) { +test('time moves', function(assert) { + var done = assert.async(); var animator = new torque.Animator(function(){}, {steps: 500, animationDuration: 10}); animator.start(); setTimeout(function(){ assert.notEqual(animator._time, 0); - QUnit.start(); + done(); }, 100) animator.pause(); }); @@ -58,25 +59,27 @@ test("altering steps should rescale", function(assert){ assert.ok(animator.rescale.calledOnce); }); -asyncTest("tick should set time to zero if steps are bigger than range", function(assert){ +test("tick should set time to zero if steps are bigger than range", function(assert){ + var done = assert.async(); var animator = new torque.Animator(function(){}, {steps: 500, animationDuration: 10}); animator.start(); setTimeout(function(){ animator._time = 0; animator.step(800); assert.ok(animator.step() < 800); - QUnit.start(); + done(); }, 200); animator.pause(); }); -asyncTest("tick should pause animation on end if loop is disabled", function(assert){ +test("tick should pause animation on end if loop is disabled", function(assert){ + var done = assert.async(); var animator = new torque.Animator(function(){}, {steps: 500, animationDuration: 10}); animator.options.loop = false; animator.toggle(); animator.step(600); setTimeout(function(){ assert.equal(animator._time,animator.options.animationDuration); - QUnit.start(); + done(); }, 200); });