Skip to content

Commit

Permalink
test: add regression test for image inside of link
Browse files Browse the repository at this point in the history
  • Loading branch information
quantizor committed Mar 21, 2024
1 parent 8eb8a13 commit 3af166c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions index.compiler.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -830,6 +830,22 @@ describe('images', () => {
</p>
`)
})

it('should handle an image inside a link', () => {
render(
compiler(
`[![youtubeImg](https://www.gstatic.com/youtube/img/promos/growth/ytp_lp2_logo_phone_landscape_300x44.png)](https://www.youtube.com/)`
)
)

expect(root.innerHTML).toMatchInlineSnapshot(`
<a href="https://www.youtube.com/">
<img alt="youtubeImg"
src="https://www.gstatic.com/youtube/img/promos/growth/ytp_lp2_logo_phone_landscape_300x44.png"
>
</a>
`)
})
})

describe('links', () => {
Expand Down

0 comments on commit 3af166c

Please sign in to comment.