Skip to content

Commit a4ade5a

Browse files
committed
Add as button back
1 parent b8d0b9b commit a4ade5a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/react/src/internal/utils/__tests__/toggleStyledComponent.test.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,11 @@ describe('toggleStyledComponent', () => {
2929
const TestComponent = toggleStyledComponent('testFeatureFlag', () => styled.div``)
3030
const {container} = render(
3131
<FeatureFlags flags={{testFeatureFlag: true}}>
32-
<TestComponent sx={{color: 'red'}} />
32+
<TestComponent as="button" sx={{color: 'red'}} />
3333
</FeatureFlags>,
3434
)
3535

36+
expect(container.firstChild).toBeInstanceOf(HTMLButtonElement)
3637
expect(container.firstChild).toHaveStyle('color: red')
3738
})
3839

0 commit comments

Comments
 (0)