Fix migration tests in Fx45
`arguments` wasn't iterable until 46
This commit is contained in:
parent
249521f12b
commit
6c6a775be2
1 changed files with 16 additions and 2 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue