fix: add missing vi import and fix getByText exact match assertions
CI / Test (pull_request) Successful in 13s
CI / Lint & Typecheck (pull_request) Failing after 20s
CI / Build & Push Docker Image (pull_request) Has been skipped

- analytics.test.ts: add vi to vitest import (was used at lines 24, 37, 66)
- BookingError.test.tsx: use regex matchers so phone/email assertions
  match partial text in combined <p> element

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
Flea Flicker
2026-05-26 12:57:43 +00:00
parent 3bccb1ac01
commit 7e5a851d9c
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -28,11 +28,11 @@ describe("BookingErrorPage", () => {
it("displays business contact phone", () => {
render(<BookingErrorPage />);
expect(screen.getByText(BUSINESS_CONTACT_INFO.phone)).toBeInTheDocument();
expect(screen.getByText(new RegExp(BUSINESS_CONTACT_INFO.phone.replace(/[()]/g, "\\$&")))).toBeInTheDocument();
});
it("displays business contact email", () => {
render(<BookingErrorPage />);
expect(screen.getByText(BUSINESS_CONTACT_INFO.email)).toBeInTheDocument();
expect(screen.getByText(new RegExp(BUSINESS_CONTACT_INFO.email))).toBeInTheDocument();
});
});
+1 -1
View File
@@ -1,4 +1,4 @@
import { describe, it, expect } from "vitest";
import { describe, it, expect, vi } from "vitest";
import { ANALYTICS_EVENTS, fireAnalyticsEvent } from "../lib/analytics";
describe("analytics", () => {