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

@ -464,7 +464,7 @@ describe("Connector Server", function () {
});
it('should import a style with application/vnd.citationstyles.style+xml content-type', function* () {
sinon.stub(Zotero.Styles, 'install', function(style) {
sinon.stub(Zotero.Styles, 'install').callsFake(function(style) {
var parser = Components.classes["@mozilla.org/xmlextras/domparser;1"]
.createInstance(Components.interfaces.nsIDOMParser),
doc = parser.parseFromString(style, "application/xml");