Upload src/components/CsvExportButton.test.tsx with huggingface_hub
Browse files
src/components/CsvExportButton.test.tsx
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { render, screen } from '@testing-library/react';
|
| 2 |
+
import { describe, it, expect } from 'vitest';
|
| 3 |
+
import CsvExportButton from './CsvExportButton';
|
| 4 |
+
|
| 5 |
+
describe('CsvExportButton', () => {
|
| 6 |
+
it('renders correctly', () => {
|
| 7 |
+
const data = [{ name: "Alex" }];
|
| 8 |
+
render(<CsvExportButton data={data} filename="test.csv" />);
|
| 9 |
+
expect(screen.getByText('Export CSV')).toBeDefined();
|
| 10 |
+
});
|
| 11 |
+
});
|