diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2017-04-24 10:39:37 +0200 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2017-04-24 10:39:37 +0200 |
commit | 2317d7bb497cce3e5731dd43e2e69b9d3e780bb0 (patch) | |
tree | 3a88ee19f44ec38cc49741d70ed56b557cca9384 /core/js/tests/specs/jquery.avatarSpec.js | |
parent | 8a1d3c7e877f143d211af259d08737c0d9aa8cfe (diff) | |
download | nextcloud-server-2317d7bb497cce3e5731dd43e2e69b9d3e780bb0.tar.gz nextcloud-server-2317d7bb497cce3e5731dd43e2e69b9d3e780bb0.zip |
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 <christoph@winzerhof-wurst.at>
Diffstat (limited to 'core/js/tests/specs/jquery.avatarSpec.js')
-rw-r--r-- | core/js/tests/specs/jquery.avatarSpec.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/js/tests/specs/jquery.avatarSpec.js b/core/js/tests/specs/jquery.avatarSpec.js index 9bb10c41be7..dab78500d0b 100644 --- a/core/js/tests/specs/jquery.avatarSpec.js +++ b/core/js/tests/specs/jquery.avatarSpec.js @@ -186,7 +186,7 @@ describe('jquery.avatar tests', function() { }); it('with ie8 fix', function() { - sinon.stub(Math, 'random', function() { + sinon.stub(Math, 'random').callsFake(function() { return 0.5; }); |