+
+
+
Payments processed securely by Square
+
+ );
+}
diff --git a/src/config.ts b/src/config.ts
index 370afc7..9163d7a 100644
--- a/src/config.ts
+++ b/src/config.ts
@@ -3,9 +3,13 @@ import { z } from "zod";
const zEnv = z.object({
VITE_BASE_URL: z.string().url(),
VITE_DOMAIN: z.string().min(1).max(100),
+ VITE_SQUARE_APPLICATION_ID: z.string().min(1),
+ VITE_SQUARE_LOCATION_ID: z.string().min(1),
});
const parsed = zEnv.parse(import.meta.env);
export const BASE_URL = parsed.VITE_BASE_URL;
export const DOMAIN = parsed.VITE_DOMAIN;
+export const SQUARE_APPLICATION_ID = parsed.VITE_SQUARE_APPLICATION_ID;
+export const SQUARE_LOCATION_ID = parsed.VITE_SQUARE_LOCATION_ID;
diff --git a/src/pages/Checkout.test.tsx b/src/pages/Checkout.test.tsx
deleted file mode 100644
index 2a8562b..0000000
--- a/src/pages/Checkout.test.tsx
+++ /dev/null
@@ -1,132 +0,0 @@
-import { render, screen } from "@testing-library/react";
-import userEvent from "@testing-library/user-event";
-import { createMemoryRouter, RouterProvider } from "react-router-dom";
-import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
-import Checkout from "./Checkout";
-
-vi.mock("../config", () => ({
- BASE_URL: "http://test.local",
-}));
-
-const updateQuantity = vi.fn();
-
-vi.mock("../context/CartContext", () => ({
- useCart: () => ({
- updateQuantity,
- }),
-}));
-
-function jsonResponse(body: unknown, init: ResponseInit = {}) {
- return new Response(JSON.stringify(body), {
- headers: { "Content-Type": "application/json" },
- ...init,
- });
-}
-
-function renderCheckout() {
- const router = createMemoryRouter(
- [
- {
- path: "/checkout",
- element: