summaryrefslogtreecommitdiff
path: root/src/components/ui/skeleton.test.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/ui/skeleton.test.tsx')
-rw-r--r--src/components/ui/skeleton.test.tsx16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/components/ui/skeleton.test.tsx b/src/components/ui/skeleton.test.tsx
new file mode 100644
index 0000000..4459d77
--- /dev/null
+++ b/src/components/ui/skeleton.test.tsx
@@ -0,0 +1,16 @@
+import { render, screen } from '@testing-library/react';
+import { describe, expect, test } from 'vitest';
+import { Skeleton } from './skeleton';
+
+describe('Skeleton', () => {
+ test('renders with default and custom classes', () => {
+ render(<Skeleton data-testid='skeleton' className='h-4 w-20' />);
+
+ const skeleton = screen.getByTestId('skeleton');
+ expect(skeleton).toHaveAttribute('data-slot', 'skeleton');
+ expect(skeleton.className).toContain('animate-pulse');
+ expect(skeleton.className).toContain('h-4');
+ expect(skeleton.className).toContain('w-20');
+ });
+});
+