change test to test whether the underlying dom tag is changed to span when using as prop (#2283)
Test in line 105 already covers using the as tag to change the underlying dom tag to an anchor tag. Therefore we can test whether a span tag is correctly rendered for example.
This commit is contained in:
@@ -127,15 +127,15 @@ describe('Setup API', () => {
|
||||
|
||||
it('should be possible to change the underlying DOM tag', () => {
|
||||
let { container } = render(
|
||||
<Transition show={true} as="a">
|
||||
<Transition show={true} as="span">
|
||||
Children
|
||||
</Transition>
|
||||
)
|
||||
|
||||
expect(container.firstChild).toMatchInlineSnapshot(`
|
||||
<a>
|
||||
<span>
|
||||
Children
|
||||
</a>
|
||||
</span>
|
||||
`)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user