Modernize sinon.stub() calls

This commit is contained in:
Tom Najdek 2017-05-31 16:44:35 +01:00 committed by Dan Stillman
parent 506b35840e
commit 063e13ef22
5 changed files with 19 additions and 13 deletions

View file

@ -27,7 +27,7 @@ describe("Zotero.Styles", function() {
it("should install the style from url", function* () {
var getContentsFromURLAsync = Zotero.File.getContentsFromURLAsync;
sinon.stub(Zotero.File, 'getContentsFromURLAsync', function(style) {
sinon.stub(Zotero.File, 'getContentsFromURLAsync').callsFake(function(style) {
if (style.url == styleID) {
return Zotero.Promise.resolve(style);
} else {