aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2019-04-04 16:53:38 +0200
committerGitHub <noreply@github.com>2019-04-04 16:53:38 +0200
commitfea7a2a328f475048b4450c5c02a60832fdcfc3c (patch)
treeb66a2177e1adf20a519e2be1c6e620db1bc27da8 /test/unit
parent9b9fca45f37b32849771685d12d770d5b88435cf (diff)
downloadjquery-fea7a2a328f475048b4450c5c02a60832fdcfc3c.tar.gz
jquery-fea7a2a328f475048b4450c5c02a60832fdcfc3c.zip
Build: Update Sinon from 2.3.7 to 7.3.1, other updates
Closes gh-4341
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;
},