From 2317d7bb497cce3e5731dd43e2e69b9d3e780bb0 Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Mon, 24 Apr 2017 10:39:37 +0200 Subject: Fix sinon.stub deprecation warnings Calls to `sinon.stub(obj, 'meth', fn)` are deprecated and therefore replaced by `sinon.stub(obj, 'meth).callsFake(fn)` as instructed by the deprecation warning. This makes the js unit testing output readable again. Signed-off-by: Christoph Wurst --- apps/files/tests/js/filelistSpec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps/files/tests/js') diff --git a/apps/files/tests/js/filelistSpec.js b/apps/files/tests/js/filelistSpec.js index 865aa35ac6a..ee73914f166 100644 --- a/apps/files/tests/js/filelistSpec.js +++ b/apps/files/tests/js/filelistSpec.js @@ -2273,7 +2273,7 @@ describe('OCA.Files.FileList tests', function() { var actionStub = sinon.stub(); var readyHandler = sinon.stub(); var clock = sinon.useFakeTimers(); - var debounceStub = sinon.stub(_, 'debounce', function(callback) { + var debounceStub = sinon.stub(_, 'debounce').callsFake(function(callback) { return function() { // defer instead of debounce, to make it work with clock _.defer(callback); -- cgit v1.2.3