Upload src/components/AnimatedLogo.test.tsx with huggingface_hub
Browse files
src/components/AnimatedLogo.test.tsx
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { render } from '@testing-library/react';
|
| 2 |
+
import { describe, it, expect } from 'vitest';
|
| 3 |
+
import AnimatedLogo from './AnimatedLogo';
|
| 4 |
+
|
| 5 |
+
describe('AnimatedLogo', () => {
|
| 6 |
+
it('renders SVG elements successfully', () => {
|
| 7 |
+
const { container } = render(<AnimatedLogo className="test-class" />);
|
| 8 |
+
const svg = container.querySelector('svg');
|
| 9 |
+
expect(svg).toBeDefined();
|
| 10 |
+
expect(svg?.classList.contains('test-class')).toBe(true);
|
| 11 |
+
|
| 12 |
+
// Check for gradients and paths
|
| 13 |
+
expect(container.querySelector('linearGradient#crypto-grad-1')).toBeDefined();
|
| 14 |
+
expect(container.querySelector('path')).toBeDefined();
|
| 15 |
+
});
|
| 16 |
+
});
|