diff --git a/testTranslators/translatorTester.js b/testTranslators/translatorTester.js index 5be6417..a1e309e 100644 --- a/testTranslators/translatorTester.js +++ b/testTranslators/translatorTester.js @@ -224,8 +224,12 @@ var Zotero_TranslatorTester = function(translator, type, debugCallback, translat var testEnd = code.indexOf("/** END TEST CASES **/"); if (testStart !== -1 && testEnd !== -1) { var test = code.substring(testStart + 24, testEnd) + .trim() .replace(/^[\s\r\n]*var testCases = /, '') .replace(/;[\s\r\n]*$/, ''); + if (!test) { + test = "[]"; + } try { var testObject = JSON.parse(test); } catch (e) {