import React from 'react'; import { composeStories } from '@storybook/react-vite'; import { render as testRender } from '../../../../vitest/render'; import * as stories from './TableHeader.stories'; const composedStories = composeStories(stories); describe('TableHeader Story Snapshots', () => { it('has tests for all stories', () => { const storyNames = Object.keys(composedStories); const testedStories = new Set(['Default']); const untestedStories = storyNames.filter(name => !testedStories.has(name)); expect(untestedStories).toEqual([]); }); it('renders Default story', () => { const Story = composedStories.Default; const { container } = testRender(); expect(container).toMatchInlineSnapshot(`
Header cell 1 Header cell 2 Header cell 3 Header cell 4
Row 1, cell 1 Row 1, cell 2 Row 1, cell 3 Row 1, cell 4
Row 2, cell 1 Row 2, cell 2 Row 2, cell 3 Row 2, cell 4
Row 3, cell 1 Row 3, cell 2 Row 3, cell 3 Row 3, cell 4
Row 4, cell 1 Row 4, cell 2 Row 4, cell 3 Row 4, cell 4
`); }); });