Skip to content

Commit cb25096

Browse files
authored
fix: unit test flake (calcom#25780)
1 parent e2ac05e commit cb25096

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

packages/features/bookings/Booker/components/hooks/useInitialFormValues.test.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/**
22
* @vitest-environment jsdom
33
*/
4-
import { renderHook, waitFor } from "@testing-library/react";
5-
import { describe, it, expect, vi, beforeEach } from "vitest";
4+
import { cleanup, renderHook, waitFor } from "@testing-library/react";
5+
import { describe, it, expect, vi, beforeEach, afterEach } from "vitest";
66

77
import type { BookerEvent } from "@calcom/features/bookings/types";
88

@@ -49,6 +49,10 @@ describe("useInitialFormValues - Autofill Disable Feature", () => {
4949
vi.clearAllMocks();
5050
});
5151

52+
afterEach(() => {
53+
cleanup();
54+
});
55+
5256
describe("when organization has NOT disabled autofill", () => {
5357
it("should use URL parameters to prefill form fields", async () => {
5458
const eventType: Pick<BookerEvent, "bookingFields" | "team" | "owner"> = {

0 commit comments

Comments
 (0)