Files
calendar/packages/ui/__mocks__/ui.tsx
T
Hariom BalharaandGitHub 28c631e108 test: Unit Tests for FormBuilderField and BookingFields components (#16162)
* Remove use of location from FormBuilder

* Add tests

* FormBuilderField and BookingFields tests

* More tests

* Remove always true if condition

* Fix ui import mockig that got broken after the last merge
2024-09-03 08:58:34 -04:00

14 lines
407 B
TypeScript

import { vi } from "vitest";
vi.mock("@calcom/ui", async (originalImport) => {
const original = (await originalImport()) as Record<string, unknown>;
// Dynamic imports of Components are not supported in Vitest. So, we use the non-lazy version of the components
return {
...original,
PhoneInput: original.PhoneInputNonLazy,
AddressInput: original.AddressInputNonLazy,
};
});
export {};