Skip to content

Commit 399ab4e

Browse files
authored
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.
1 parent adfe121 commit 399ab4e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/@headlessui-react/src/components/transitions/transition.test.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,15 @@ describe('Setup API', () => {
127127

128128
it('should be possible to change the underlying DOM tag', () => {
129129
let { container } = render(
130-
<Transition show={true} as="a">
130+
<Transition show={true} as="span">
131131
Children
132132
</Transition>
133133
)
134134

135135
expect(container.firstChild).toMatchInlineSnapshot(`
136-
<a>
136+
<span>
137137
Children
138-
</a>
138+
</span>
139139
`)
140140
})
141141

0 commit comments

Comments
 (0)