From c0350fb6b2e9411ca2e9363aacf36101c5adfb2d Mon Sep 17 00:00:00 2001 From: igor <igor.markin@vereign.com> Date: Wed, 16 Dec 2020 18:31:42 +0300 Subject: [PATCH] Cover test outlook-gmail cases --- __tests__/html-outlook-gmail.test.ts | 16 ++++++++++++++++ __tests__/htmltext-outlook-gmail.test.ts | 18 ++++++++++++++++++ __tests__/plain-outlook-gmail.test.ts | 12 ++++++++++++ 3 files changed, 46 insertions(+) create mode 100644 __tests__/html-outlook-gmail.test.ts create mode 100644 __tests__/htmltext-outlook-gmail.test.ts create mode 100644 __tests__/plain-outlook-gmail.test.ts diff --git a/__tests__/html-outlook-gmail.test.ts b/__tests__/html-outlook-gmail.test.ts new file mode 100644 index 0000000..c0e8ad8 --- /dev/null +++ b/__tests__/html-outlook-gmail.test.ts @@ -0,0 +1,16 @@ +import { describe } from "@jest/globals"; +import { EMAIL_VENDORS } from "../src"; +import { createDescribeHtmlTestCases } from "./utils"; +const path = require("path"); + +const TESTS_GLOBAL_PATH = "/files/outlook-gmail"; +const testsPath = path.resolve(__dirname, `.${TESTS_GLOBAL_PATH}`); + +describe("[HTML] Outlook-GMail emails normalization", () => { + const describeFunction = createDescribeHtmlTestCases( + testsPath, + EMAIL_VENDORS.OUTLOOK + ); + + describe("Chrome-Chrome", describeFunction("chrome-chrome", [])); +}); diff --git a/__tests__/htmltext-outlook-gmail.test.ts b/__tests__/htmltext-outlook-gmail.test.ts new file mode 100644 index 0000000..0838483 --- /dev/null +++ b/__tests__/htmltext-outlook-gmail.test.ts @@ -0,0 +1,18 @@ +import { describe } from "@jest/globals"; +import { createDescribePseudoPlainTestCases } from "./utils"; +import { EMAIL_VENDORS } from "../src"; + +const path = require("path"); + +const TESTS_GLOBAL_PATH = "/files/outlook-gmail"; +const testsPath = path.resolve(__dirname, `.${TESTS_GLOBAL_PATH}`); + +describe("[Pseudo PLAIN] Outlook-Gmail normalization", () => { + const describeFunction = createDescribePseudoPlainTestCases( + testsPath, + EMAIL_VENDORS.OUTLOOK + ); + + // ["01"] - is a filter. Pass here names of directories with test cases you want to check + describe("Chrome-Chrome", describeFunction("chrome-chrome")); +}); diff --git a/__tests__/plain-outlook-gmail.test.ts b/__tests__/plain-outlook-gmail.test.ts new file mode 100644 index 0000000..f74daac --- /dev/null +++ b/__tests__/plain-outlook-gmail.test.ts @@ -0,0 +1,12 @@ +import { describe } from "@jest/globals"; +import { createDescribePlainTestCases } from "./utils"; +const path = require("path"); + +const TESTS_GLOBAL_PATH = "/files/outlook-gmail"; + +const testsPath = path.resolve(__dirname, `.${TESTS_GLOBAL_PATH}`); + +describe("[Plain] Outlook-Gmail normalization", () => { + const describeFunction = createDescribePlainTestCases(testsPath); + describe("Chrome-Chrome", describeFunction("chrome-chrome")); +}); -- GitLab