From bd7eadd721cb060621307bf9204271e8183ffd7d Mon Sep 17 00:00:00 2001 From: "GitStart-Cal.com" <121884634+gitstart-calcom@users.noreply.github.com> Date: Wed, 19 Jul 2023 16:22:41 +0100 Subject: [PATCH] test: Create unit tests for react components in packages/ui/components/alert (tests-alert-component) (#9897) Co-authored-by: gitstart-calcom --- package.json | 1 + packages/ui/components/alert/Alert.tsx | 7 ++++ packages/ui/components/alert/alert.test.tsx | 41 +++++++++++++++++++++ packages/ui/components/test-setup.ts | 9 +++++ vitest.workspace.ts | 9 +++++ 5 files changed, 67 insertions(+) create mode 100644 packages/ui/components/alert/alert.test.tsx create mode 100644 packages/ui/components/test-setup.ts diff --git a/package.json b/package.json index aba79f9caf..b5dc351f11 100644 --- a/package.json +++ b/package.json @@ -77,6 +77,7 @@ "@deploysentinel/playwright": "^0.3.3", "@playwright/test": "^1.31.2", "@snaplet/copycat": "^0.3.0", + "@testing-library/jest-dom": "^5.16.5", "@types/dompurify": "^2.4.0", "c8": "^7.13.0", "dotenv-checker": "^1.1.5", diff --git a/packages/ui/components/alert/Alert.tsx b/packages/ui/components/alert/Alert.tsx index 4b040aa303..2f6a4422ee 100644 --- a/packages/ui/components/alert/Alert.tsx +++ b/packages/ui/components/alert/Alert.tsx @@ -23,6 +23,7 @@ export const Alert = forwardRef((props, ref) => { return (
((props, ref) => { {CustomIcon ? (