From e3d85ebc39c0fcbfb9d2a4e9999e964a79e39cfb Mon Sep 17 00:00:00 2001 From: igor <igor.markin@vereign.com> Date: Wed, 2 Dec 2020 18:59:07 +0300 Subject: [PATCH] Fixes --- __tests__/plain-gmail-outlook.test.ts | 3 +++ __tests__/plain-outlook-outlook.test.ts | 24 +++++++++++++++++++++--- __tests__/utils.ts | 8 +------- 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/__tests__/plain-gmail-outlook.test.ts b/__tests__/plain-gmail-outlook.test.ts index f40d1f6..bcb98da 100644 --- a/__tests__/plain-gmail-outlook.test.ts +++ b/__tests__/plain-gmail-outlook.test.ts @@ -22,6 +22,9 @@ describe("[Plain] Gmail-Outlook normalization", () => { "25reply", "26reply", "27reply", + "21forward", // missing file + "23forward", // missing file + "24forward", // missing file ]) ); }); diff --git a/__tests__/plain-outlook-outlook.test.ts b/__tests__/plain-outlook-outlook.test.ts index b4d729e..2298b6a 100644 --- a/__tests__/plain-outlook-outlook.test.ts +++ b/__tests__/plain-outlook-outlook.test.ts @@ -9,8 +9,26 @@ const testsPath = path.resolve(__dirname, `.${TESTS_GLOBAL_PATH}`); describe("Outlook emails Plain normalization", () => { const describeFunction = createDescribePlainTestCases(testsPath); describe("Emails Chrome", describeFunction("chrome")); - describe("Emails Edge", describeFunction("edge", ["21"])); - describe("Emails Safari", describeFunction("safari")); + describe( + "Emails Edge", + describeFunction("edge", [ + "21", + "08", // missing files + "10", // missing files + ]) + ); + describe( + "Emails Safari", + describeFunction("safari", [ + "08", // missing files + ]) + ); describe("Emails MacOS", describeFunction("macos", ["21", "23", "25"])); - describe("Emails Windows", describeFunction("windows", ["25"])); + describe( + "Emails Windows", + describeFunction("windows", [ + "25", + "10", // missing file + ]) + ); }); diff --git a/__tests__/utils.ts b/__tests__/utils.ts index 696873f..7a0e7b9 100644 --- a/__tests__/utils.ts +++ b/__tests__/utils.ts @@ -120,13 +120,7 @@ export const createDescribePlainTestCases = (testsPath: string) => ( test.each(testCasesDirs)("Case %s", (dirName: string) => { const testCasePath = testsCasesPath + "/" + dirName; - let normalizedPlain; - try { - normalizedPlain = getNormalizedPlain(testCasePath); - } catch (e) { - console.log(`Invalid test case: ${casesName}/${dirName}`); - return; - } + const normalizedPlain = getNormalizedPlain(testCasePath); const { sentPlain, receivedPlain } = normalizedPlain; -- GitLab