Fix migration tests in Fx45

`arguments` wasn't iterable until 46
This commit is contained in:
Dan Stillman 2016-11-20 01:54:09 -05:00
parent 249521f12b
commit 6c6a775be2

View file

@ -145,7 +145,14 @@ describe("Zotero Core Functions", function () {
return Zotero.Promise.reject(new Error("Error")); return Zotero.Promise.reject(new Error("Error"));
} }
else { else {
return origFunc(...arguments); let args;
if (Zotero.platformMajorVersion < 46) {
args = Array.from(arguments);
}
else {
args = arguments;
}
return origFunc(...args);
} }
}); });
let stub4 = sinon.stub(Zotero.File, "reveal").returns(Zotero.Promise.resolve()); let stub4 = sinon.stub(Zotero.File, "reveal").returns(Zotero.Promise.resolve());
@ -293,7 +300,14 @@ describe("Zotero Core Functions", function () {
return Zotero.Promise.reject(new Error("Error")); return Zotero.Promise.reject(new Error("Error"));
} }
else { else {
return origFunc(...arguments); let args;
if (Zotero.platformMajorVersion < 46) {
args = Array.from(arguments);
}
else {
args = arguments;
}
return origFunc(...args);
} }
}); });