From 28f7ceae9b63d190cd1d72eb7d43b568b7df69f2 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Mon, 20 Mar 2017 16:51:02 +0000 Subject: [PATCH 1/2] chore(package): update sinon to version 2.1.0 Closes #134 https://greenkeeper.io/ --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d7662bb..8d9205b 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "gulp-shell": "^0.6.1", "gulp-util": "^3.0.7", "mocha": "^3.0.0", - "sinon": "^1.17.3", + "sinon": "^2.1.0", "webpack": "^2.2.1" } } From e7f677ee2ae1c89ac5d88b5469c1657c8c0eda5a Mon Sep 17 00:00:00 2001 From: Glen Cheney Date: Tue, 21 Mar 2017 00:11:31 -0700 Subject: [PATCH 2/2] Remove deprecated usage of sinon. --- test/test.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/test.js b/test/test.js index 5ccb2a1..e5e95c4 100644 --- a/test/test.js +++ b/test/test.js @@ -79,13 +79,15 @@ describe('shuffle', function () { return document.getElementById(id); } + function whenTransitionDoneStub(element, itemCallback, done) { + setTimeout(done, 0); + } + describe('regular fixture', function () { beforeEach(function (done) { // Mock the transition end event wrapper. - sinon.stub(Shuffle.prototype, '_whenTransitionDone', function (element, itemCallback, done) { - setTimeout(done, 0); - }); + sinon.stub(Shuffle.prototype, '_whenTransitionDone').callsFake(whenTransitionDoneStub); appendFixture('regular').then(done); }); @@ -558,9 +560,7 @@ describe('shuffle', function () { describe('delimeter fixture', function () { beforeEach(function (done) { // Mock the transition end event wrapper. - sinon.stub(Shuffle.prototype, '_whenTransitionDone', function (element, itemCallback, done) { - setTimeout(done, 0); - }); + sinon.stub(Shuffle.prototype, '_whenTransitionDone').callsFake(whenTransitionDoneStub); appendFixture('delimeter').then(done); });