Move stories and tests inside each component folders

This commit is contained in:
Charles Bochet
2022-12-05 21:56:53 +01:00
parent 92267701ff
commit 374573871c
21 changed files with 111 additions and 61 deletions

View File

@ -0,0 +1,17 @@
import { render } from '@testing-library/react';
import { NavbarOnInsights } from '../__stories__/Navbar.stories';
it('Checks the NavItem renders', () => {
const { getByRole } = render(<NavbarOnInsights />);
expect(getByRole('button', { name: 'Insights' })).toHaveAttribute(
'aria-selected',
'true',
);
expect(getByRole('button', { name: 'Inbox' })).toHaveAttribute(
'aria-selected',
'false',
);
});