import React from 'react'; import { composeStories } from '@storybook/react-vite'; import { render as testRender } from '../../../../vitest/render'; import * as stories from './CounterInput.stories'; const composedStories = composeStories(stories); describe('CounterInput Story Snapshots', () => { it('has tests for all stories', () => { const storyNames = Object.keys(composedStories); const testedStories = new Set([ 'Default', 'WithValue', 'Disabled', 'Error', 'Warning', 'WithMinMax', 'SmallWidth', 'MediumWidth', ]); 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(`
`); }); it('renders WithValue story', () => { const Story = composedStories.WithValue; const { container } = testRender(); expect(container).toMatchInlineSnapshot(`
`); }); it('renders Disabled story', () => { const Story = composedStories.Disabled; const { container } = testRender(); expect(container).toMatchInlineSnapshot(`
`); }); it('renders Error story', () => { const Story = composedStories.Error; const { container } = testRender(); expect(container).toMatchInlineSnapshot(`
`); }); it('renders Warning story', () => { const Story = composedStories.Warning; const { container } = testRender(); expect(container).toMatchInlineSnapshot(`
`); }); it('renders WithMinMax story', () => { const Story = composedStories.WithMinMax; const { container } = testRender(); expect(container).toMatchInlineSnapshot(`
`); }); it('renders SmallWidth story', () => { const Story = composedStories.SmallWidth; const { container } = testRender(); expect(container).toMatchInlineSnapshot(`
`); }); it('renders MediumWidth story', () => { const Story = composedStories.MediumWidth; const { container } = testRender(); expect(container).toMatchInlineSnapshot(`
`); }); });