From 3af166c547d49d4762c5aefb351556f436b209c6 Mon Sep 17 00:00:00 2001 From: Evan Jacobs Date: Wed, 20 Mar 2024 23:33:50 -0400 Subject: [PATCH] test: add regression test for image inside of link --- index.compiler.spec.tsx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/index.compiler.spec.tsx b/index.compiler.spec.tsx index e6a83e67..62659462 100644 --- a/index.compiler.spec.tsx +++ b/index.compiler.spec.tsx @@ -830,6 +830,22 @@ describe('images', () => {

`) }) + + 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(` + + youtubeImg + + `) + }) }) describe('links', () => {