diff options
author | 2023-05-29 16:37:40 +0800 | |
---|---|---|
committer | 2023-05-29 16:37:40 +0800 | |
commit | df1e6f78dfb44ccdb23125aa66d03f446aa35777 (patch) | |
tree | dd98b287a71ad6224ac54a2ad76ad70ce32d043a /packages/integrations/markdoc/test | |
parent | f2f18b44055c6334a39d6379de88fe41e518aa1e (diff) | |
download | astro-df1e6f78dfb44ccdb23125aa66d03f446aa35777.tar.gz astro-df1e6f78dfb44ccdb23125aa66d03f446aa35777.tar.zst astro-df1e6f78dfb44ccdb23125aa66d03f446aa35777.zip |
Fix markdoc image tests (#7231)
Diffstat (limited to 'packages/integrations/markdoc/test')
-rw-r--r-- | packages/integrations/markdoc/test/image-assets.test.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/integrations/markdoc/test/image-assets.test.js b/packages/integrations/markdoc/test/image-assets.test.js index 313977934..7339960dd 100644 --- a/packages/integrations/markdoc/test/image-assets.test.js +++ b/packages/integrations/markdoc/test/image-assets.test.js @@ -35,8 +35,8 @@ describe('Markdoc - Image assets', () => { const res = await baseFixture.fetch('/'); const html = await res.text(); const { document } = parseHTML(html); - expect(document.querySelector('#relative > img')?.src).to.equal( - '/_image?href=%2Fsrc%2Fassets%2Frelative%2Foar.jpg%3ForigWidth%3D420%26origHeight%3D630%26origFormat%3Djpg&f=webp' + expect(document.querySelector('#relative > img')?.src).to.match( + /\/_image\?href=.*%2Fsrc%2Fassets%2Frelative%2Foar.jpg%3ForigWidth%3D420%26origHeight%3D630%26origFormat%3Djpg&f=webp/ ); }); @@ -44,8 +44,8 @@ describe('Markdoc - Image assets', () => { const res = await baseFixture.fetch('/'); const html = await res.text(); const { document } = parseHTML(html); - expect(document.querySelector('#alias > img')?.src).to.equal( - '/_image?href=%2Fsrc%2Fassets%2Falias%2Fcityscape.jpg%3ForigWidth%3D420%26origHeight%3D280%26origFormat%3Djpg&f=webp' + expect(document.querySelector('#alias > img')?.src).to.match( + /\/_image\?href=.*%2Fsrc%2Fassets%2Falias%2Fcityscape.jpg%3ForigWidth%3D420%26origHeight%3D280%26origFormat%3Djpg&f=webp/ ); }); }); |