fix: unit test flake (#25780)

This commit is contained in:
Anik Dhabal Babu
2025-12-12 10:28:29 +05:30
committed by GitHub
parent e2ac05e82f
commit cb2509683d
@@ -1,8 +1,8 @@
/**
* @vitest-environment jsdom
*/
import { renderHook, waitFor } from "@testing-library/react";
import { describe, it, expect, vi, beforeEach } from "vitest";
import { cleanup, renderHook, waitFor } from "@testing-library/react";
import { describe, it, expect, vi, beforeEach, afterEach } from "vitest";
import type { BookerEvent } from "@calcom/features/bookings/types";
@@ -49,6 +49,10 @@ describe("useInitialFormValues - Autofill Disable Feature", () => {
vi.clearAllMocks();
});
afterEach(() => {
cleanup();
});
describe("when organization has NOT disabled autofill", () => {
it("should use URL parameters to prefill form fields", async () => {
const eventType: Pick<BookerEvent, "bookingFields" | "team" | "owner"> = {