Skip to content

Commit

Permalink
chore: alter construct dedupe test to better check result
Browse files Browse the repository at this point in the history
  • Loading branch information
eels committed Oct 28, 2021
1 parent 40b74ae commit 66d98f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/lib/construct.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,14 +261,14 @@ describe('lib/construct', () => {

it('should dedupe class names where required', () => {
const parameters: ConstructOptions = {
attrs: { isPrimary: true },
attrs: { className: 'heading', isPrimary: true },
classNames: 'heading',
styles: styles,
target: 'h1',
};

render(createElement(construct(parameters), { isPrimary: true }));
expect(screen.getByRole('heading')).toHaveClass('heading heading--primary');
expect(screen.getByRole('heading').className).toMatch('heading heading--primary');
});

it('should convert `style` props to a dynamically rendered class name', () => {
Expand Down

0 comments on commit 66d98f4

Please sign in to comment.