summaryrefslogtreecommitdiff
path: root/packages/integrations/mdx/test/mdx-images.test.js
diff options
context:
space:
mode:
authorGravatar Princesseuh <Princesseuh@users.noreply.github.com> 2023-09-13 16:29:09 +0000
committerGravatar astrobot-houston <fred+astrobot@astro.build> 2023-09-13 16:29:09 +0000
commitde8d6ad2376fef8e6d8c02e590c1322dbfa1a7a9 (patch)
treed064a76db6be5bd154b550f36d46e30336691826 /packages/integrations/mdx/test/mdx-images.test.js
parenta8d72ceaeed154434923b21c0ae129a72263b8ed (diff)
downloadastro-de8d6ad2376fef8e6d8c02e590c1322dbfa1a7a9.tar.gz
astro-de8d6ad2376fef8e6d8c02e590c1322dbfa1a7a9.tar.zst
astro-de8d6ad2376fef8e6d8c02e590c1322dbfa1a7a9.zip
[ci] format
Diffstat (limited to '')
-rw-r--r--packages/integrations/mdx/test/mdx-images.test.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/integrations/mdx/test/mdx-images.test.js b/packages/integrations/mdx/test/mdx-images.test.js
index 128a2fcb0..950b54581 100644
--- a/packages/integrations/mdx/test/mdx-images.test.js
+++ b/packages/integrations/mdx/test/mdx-images.test.js
@@ -2,7 +2,7 @@ import { expect } from 'chai';
import { parseHTML } from 'linkedom';
import { loadFixture } from '../../../astro/test/test-utils.js';
-const imageTestRoutes = ['with-components', 'esm-import', 'content-collection']
+const imageTestRoutes = ['with-components', 'esm-import', 'content-collection'];
describe('MDX Page', () => {
let devServer;
@@ -43,17 +43,17 @@ describe('MDX Page', () => {
it(`supports img component - ${route}`, async () => {
const res = await fixture.fetch(`/${route}`);
expect(res.status).to.equal(200);
-
+
const html = await res.text();
const { document } = parseHTML(html);
-
+
const imgs = document.getElementsByTagName('img');
expect(imgs.length).to.equal(2);
-
+
const assetsImg = imgs.item(0);
expect(assetsImg.src.startsWith('/_image')).to.be.true;
expect(assetsImg.hasAttribute('data-my-image')).to.be.true;
-
+
const publicImg = imgs.item(1);
expect(publicImg.src).to.equal('/favicon.svg');
expect(publicImg.hasAttribute('data-my-image')).to.be.true;