www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 6c6a775be2529506f157ca4eb1993f35c22a2a9a
parent 249521f12bed3cf6181ecf0cd459ca63782143b2
Author: Dan Stillman <dstillman@zotero.org>
Date:   Sun, 20 Nov 2016 01:54:09 -0500

Fix migration tests in Fx45

`arguments` wasn't iterable until 46

Diffstat:
Mtest/tests/zoteroTest.js | 18++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/test/tests/zoteroTest.js b/test/tests/zoteroTest.js @@ -145,7 +145,14 @@ describe("Zotero Core Functions", function () { return Zotero.Promise.reject(new Error("Error")); } 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()); @@ -293,7 +300,14 @@ describe("Zotero Core Functions", function () { return Zotero.Promise.reject(new Error("Error")); } else { - return origFunc(...arguments); + let args; + if (Zotero.platformMajorVersion < 46) { + args = Array.from(arguments); + } + else { + args = arguments; + } + return origFunc(...args); } });