aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/animation.js8
-rw-r--r--test/unit/core.js6
-rw-r--r--test/unit/effects.js4
-rw-r--r--test/unit/tween.js4
4 files changed, 11 insertions, 11 deletions
diff --git a/test/unit/animation.js b/test/unit/animation.js
index 7a51add31..4af1f7f98 100644
--- a/test/unit/animation.js
+++ b/test/unit/animation.js
@@ -13,10 +13,10 @@ var oldRaf = window.requestAnimationFrame,
// This module tests jQuery.Animation and the corresponding 1.8+ effects APIs
QUnit.module( "animation", {
beforeEach: function() {
- window.requestAnimationFrame = null;
- this.sandbox = sinon.sandbox.create();
+ this.sandbox = sinon.createSandbox();
this.clock = this.sandbox.useFakeTimers( startTime );
this._oldInterval = jQuery.fx.interval;
+ window.requestAnimationFrame = null;
jQuery.fx.step = {};
jQuery.fx.interval = 10;
jQuery.Animation.prefilters = [ defaultPrefilter ];
@@ -168,7 +168,7 @@ QUnit.test( "Animation.prefilter - prefilter return hooks", function( assert ) {
assert.equal( TweenSpy.callCount, 0, "Returning something never creates tweens" );
// Test overridden usage on queues:
- prefilter.reset();
+ prefilter.resetHistory();
element = jQuery( "<div>" )
.css( "height", 50 )
.animate( props, 100 )
@@ -200,7 +200,7 @@ QUnit.test( "Animation.prefilter - prefilter return hooks", function( assert ) {
// ourAnimation.stop.reset();
assert.equal( prefilter.callCount, 3, "Got the next animation" );
- ourAnimation.stop.reset();
+ ourAnimation.stop.resetHistory();
// do not clear queue, gotoEnd
element.stop( false, true );
diff --git a/test/unit/core.js b/test/unit/core.js
index 28f40ab56..3cb2d3951 100644
--- a/test/unit/core.js
+++ b/test/unit/core.js
@@ -1,6 +1,6 @@
QUnit.module( "core", {
beforeEach: function() {
- this.sandbox = sinon.sandbox.create();
+ this.sandbox = sinon.createSandbox();
},
afterEach: function() {
this.sandbox.restore();
@@ -1448,7 +1448,7 @@ QUnit[ jQuery.Deferred ? "test" : "skip" ]( "jQuery.readyException (original)",
var message;
- this.sandbox.stub( window, "setTimeout", function( fn ) {
+ this.sandbox.stub( window, "setTimeout" ).callsFake( function( fn ) {
try {
fn();
} catch ( error ) {
@@ -1471,7 +1471,7 @@ QUnit[ jQuery.Deferred ? "test" : "skip" ]( "jQuery.readyException (custom)", fu
var done = assert.async();
- this.sandbox.stub( jQuery, "readyException", function( error ) {
+ this.sandbox.stub( jQuery, "readyException" ).callsFake( function( error ) {
assert.strictEqual(
error.message,
"Error in jQuery ready",
diff --git a/test/unit/effects.js b/test/unit/effects.js
index f71eafb62..05fd1283e 100644
--- a/test/unit/effects.js
+++ b/test/unit/effects.js
@@ -13,10 +13,10 @@ var oldRaf = window.requestAnimationFrame,
QUnit.module( "effects", {
beforeEach: function() {
- window.requestAnimationFrame = null;
- this.sandbox = sinon.sandbox.create();
+ this.sandbox = sinon.createSandbox();
this.clock = this.sandbox.useFakeTimers( 505877050 );
this._oldInterval = jQuery.fx.interval;
+ window.requestAnimationFrame = null;
jQuery.fx.step = {};
jQuery.fx.interval = 10;
},
diff --git a/test/unit/tween.js b/test/unit/tween.js
index 68c5c0e8d..936797877 100644
--- a/test/unit/tween.js
+++ b/test/unit/tween.js
@@ -9,10 +9,10 @@ var oldRaf = window.requestAnimationFrame;
QUnit.module( "tween", {
beforeEach: function() {
- window.requestAnimationFrame = null;
- this.sandbox = sinon.sandbox.create();
+ this.sandbox = sinon.createSandbox();
this.clock = this.sandbox.useFakeTimers( 505877050 );
this._oldInterval = jQuery.fx.interval;
+ window.requestAnimationFrame = null;
jQuery.fx.step = {};
jQuery.fx.interval = 10;
},