Skip to content

Commit

Permalink
fixup! fixup! BREAKING-CHANGE(web-react): Remove default elementType …
Browse files Browse the repository at this point in the history
…value for Heading component
  • Loading branch information
pavelklibani committed Oct 9, 2024
1 parent 6afa127 commit 2ba406c
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,18 @@ import Heading from '../Heading';
import headingSizeDataProvider from './headingSizeDataProvider';

describe('Heading', () => {
classNamePrefixProviderTest(Heading, 'typography-heading-medium-bold');
classNamePrefixProviderTest(() => <Heading elementType="h1" />, 'typography-heading-medium-bold');

stylePropsTest(Heading);
stylePropsTest((props) => <Heading elementType="h1" data-testid="heading-test-id" {...props} />, 'heading-test-id');

sizePropsTest(Heading);
sizePropsTest((props) => <Heading elementType="h1" data-testid="heading-test-id" {...props} />, 'heading-test-id');

sizeExtendedPropsTest(Heading);
sizeExtendedPropsTest(
(props) => <Heading elementType="h1" data-testid="heading-test-id" {...props} />,
'heading-test-id',
);

restPropsTest(Heading, 'div');
restPropsTest((props) => <Heading elementType="h1" {...props} />, 'h1');

it.each(headingSizeDataProvider)('should have classname', (size, emphasis, expectedClassName) => {
render(
Expand Down

0 comments on commit 2ba406c

Please sign in to comment.