Skip to content

Commit

Permalink
Improve test
Browse files Browse the repository at this point in the history
  • Loading branch information
hbjORbj committed Aug 29, 2022
1 parent c938225 commit 956dac0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/mui-joy/src/Breadcrumbs/Breadcrumbs.test.js
Expand Up @@ -28,15 +28,15 @@ describe('<Breadcrumbs />', () => {

describe('prop: size', () => {
it('md by default', () => {
const { getByTestId } = render(<Breadcrumbs data-testid="root" />);
const { getByRole } = render(<Breadcrumbs />);

expect(getByTestId('root')).to.have.class(classes.sizeMd);
expect(getByRole('navigation')).to.have.class(classes.sizeMd);
});
['sm', 'md', 'lg'].forEach((size) => {
it(`should render ${size}`, () => {
const { getByTestId } = render(<Breadcrumbs data-testid="root" size={size} />);
const { getByRole } = render(<Breadcrumbs size={size} />);

expect(getByTestId('root')).to.have.class(classes[`size${capitalize(size)}`]);
expect(getByRole('navigation')).to.have.class(classes[`size${capitalize(size)}`]);
});
});
});
Expand Down

0 comments on commit 956dac0

Please sign in to comment.