From f3652822bdaa3f1b4adda062bae6b882cc04d9be Mon Sep 17 00:00:00 2001 From: Jonathan Yeboah <10155597+JonYeb@users.noreply.github.com> Date: Fri, 26 Apr 2024 11:35:48 +0200 Subject: [PATCH] removed tests --- src/components/GooglePay/GooglePay.test.tsx | 9 ------ .../GooglePay/GooglePayButton.test.tsx | 28 ------------------- .../GooglePay/GooglePayMask.test.tsx | 15 ---------- 3 files changed, 52 deletions(-) delete mode 100644 src/components/GooglePay/GooglePay.test.tsx delete mode 100644 src/components/GooglePay/GooglePayButton.test.tsx delete mode 100644 src/components/GooglePay/GooglePayMask.test.tsx diff --git a/src/components/GooglePay/GooglePay.test.tsx b/src/components/GooglePay/GooglePay.test.tsx deleted file mode 100644 index c7c4e9a..0000000 --- a/src/components/GooglePay/GooglePay.test.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { render, screen } from "@testing-library/react"; -import { GooglePay } from "./GooglePay"; - -import { GooglePayTestParams } from "./constants"; - -test("GooglePay is shown", () => { - render(); - expect(screen).toBeDefined(); -}); diff --git a/src/components/GooglePay/GooglePayButton.test.tsx b/src/components/GooglePay/GooglePayButton.test.tsx deleted file mode 100644 index 5acccb6..0000000 --- a/src/components/GooglePay/GooglePayButton.test.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import { render, screen } from "@testing-library/react"; -import { GooglePayTestParams } from "./constants"; -import { GooglePayMask } from "./GooglePayMask"; - -const MockText: string = "GooglePayMask"; -jest.mock("./GooglePayMask", () => ({ - GooglePayMask: () =>
{MockText}
, -})); - -jest.mock("../../app/usePayment", () => ({ - usePayment: () => { - return { paymentInfo: { id: "123" } }; - }, -})); - -jest.mock("../../app/useHandleCreatePayment", () => ({ - useHandleCreatePayment: () => { - return {}; - }, -})); - -test("GooglePayButton is shown", () => { - render(); - expect(screen).toBeDefined(); - - const googlePayMask = screen.getByText(MockText); - expect(googlePayMask).toBeDefined(); -}); diff --git a/src/components/GooglePay/GooglePayMask.test.tsx b/src/components/GooglePay/GooglePayMask.test.tsx deleted file mode 100644 index f50ebb8..0000000 --- a/src/components/GooglePay/GooglePayMask.test.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import { render, screen, waitFor } from "@testing-library/react"; -import { GooglePayTestParams } from "./constants"; -import { GooglePayMask } from "./GooglePayMask"; - -/*jest.mock("../../app/loadScript", () => ({ - __esModule: true, - default: () => Promise.resolve() -}));*/ - -test("GooglePayMask is shown", async () => { - render(); - await waitFor(() => { - expect(screen).toBeDefined(); - }); -});