From 524335e0ce1e73dcea275f10d9ffb3d7728a3f3d Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Mon, 12 Mar 2018 07:12:11 +0000 Subject: [PATCH 1/2] chore(package): update sinon to version 4.4.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 16cd17e..46d5037 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "load-grunt-tasks": "^3.5.0", "mocha": "^3.0.0", "phantomjs-prebuilt": "^2.1.8", - "sinon": "^2.2.0", + "sinon": "^4.4.3", "unexpected": "^10.13.3", "unexpected-sinon": "^10.2.1" }, From e694b1d7912406f6283dda855099c2ba65c0b613 Mon Sep 17 00:00:00 2001 From: Joel Mukuthu Date: Mon, 12 Mar 2018 22:34:12 +0100 Subject: [PATCH 2/2] tests: fix stubs --- test/spec/services/scrollie.spec.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/spec/services/scrollie.spec.js b/test/spec/services/scrollie.spec.js index 5635aa2..7be68dc 100644 --- a/test/spec/services/scrollie.spec.js +++ b/test/spec/services/scrollie.spec.js @@ -42,7 +42,7 @@ describe('Service: scrollie', function () { beforeEach(function () { // create a mock requestAnimation that calls the animation function // syncronously - sinon.stub(mocks, 'requestAnimation', function (animate) { + sinon.stub(mocks, 'requestAnimation').callsFake(function (animate) { animate(); }); }); @@ -188,10 +188,10 @@ describe('Service: scrollie', function () { var $timeout; beforeEach(function () { - sinon.stub(mocks, 'requestAnimation', function (animate, delay) { + sinon.stub(mocks, 'requestAnimation').callsFake(function (animate, delay) { return $timeout(animate, delay); }); - sinon.stub(mocks, 'cancelAnimation', function (timeout) { + sinon.stub(mocks, 'cancelAnimation').callsFake(function (timeout) { return $timeout.cancel(timeout); }); });