diff --git a/packages/fuselage/src/components/SideBarV2/SideBar.spec.tsx b/packages/fuselage/src/components/SideBarV2/SideBar.spec.tsx index 5299406c6b..d125962e2a 100644 --- a/packages/fuselage/src/components/SideBarV2/SideBar.spec.tsx +++ b/packages/fuselage/src/components/SideBarV2/SideBar.spec.tsx @@ -1,26 +1,19 @@ import { composeStories } from '@storybook/react'; -import { render } from '@testing-library/react'; import { axe } from 'jest-axe'; +import { render } from '../../testing'; import * as stories from './SideBar.stories'; -const testCases = Object.values(composeStories(stories)); +const { Default } = composeStories(stories); -describe('[SideBar Component]', () => { - test.each(testCases)( - `renders %s without crashing`, - async (_storyname, Story) => { - render(); - } - ); +describe('[Sidebar Component]', () => { + it('renders without crashing', () => { + render(); + }); + it('should have no a11y violations', async () => { + const { container } = render(); - test.each(testCases)( - '%s should have no a11y violations', - async (_storyname, Story) => { - const { container } = render(); - - const results = await axe(container); - expect(results).toHaveNoViolations(); - } - ); + const results = await axe(container); + expect(results).toHaveNoViolations(); + }); });