Modernize sinon.stub() calls
This commit is contained in:
parent
506b35840e
commit
063e13ef22
5 changed files with 19 additions and 13 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue