From a3c86dbdff661303a5b3e1957f485eca2eae2414 Mon Sep 17 00:00:00 2001
From: Bertrand Yuan <189593334+bertyuan@users.noreply.github.com>
Date: Tue, 7 Apr 2026 11:24:26 +0800
Subject: Revert "A small portion of newly added unit testing code"
---
src/components/ui/card.test.tsx | 24 ------------------------
1 file changed, 24 deletions(-)
(limited to 'src/components/ui/card.test.tsx')
diff --git a/src/components/ui/card.test.tsx b/src/components/ui/card.test.tsx
index 0c29c5d..aba3d00 100644
--- a/src/components/ui/card.test.tsx
+++ b/src/components/ui/card.test.tsx
@@ -36,29 +36,5 @@ describe('Card', () => {
expect(screen.getByText('Content')).toHaveAttribute('data-slot', 'card-content');
expect(screen.getByText('Footer')).toHaveAttribute('data-slot', 'card-footer');
});
-
- test('appends custom class names correctly', () => {
- render(
-
- Content
-
- );
-
- const cardElement = screen.getByText('Content').parentElement; // 或者直接给 Card 加个 data-testid
- expect(cardElement).toHaveClass('my-custom-card-class');
- expect(screen.getByText('Content')).toHaveClass('my-custom-content-class');
- });
-
- test('passes standard HTML attributes to the DOM node', () => {
- render(
-
- Content
-
- );
-
- const cardElement = screen.getByLabelText('Test Card');
- expect(cardElement).toHaveAttribute('id', 'test-card');
- expect(screen.getByTestId('content-id')).toBeInTheDocument();
- });
});
--
cgit v1.2.3