summaryrefslogtreecommitdiff
path: root/packages/integrations/mdx/test/css-head-mdx.test.js
diff options
context:
space:
mode:
authorGravatar Matt Kane <m@mk.gg> 2025-01-08 13:24:45 +0000
committerGravatar GitHub <noreply@github.com> 2025-01-08 13:24:45 +0000
commit44841fc281f8920b32f4b4a94deefeb3ad069cf3 (patch)
tree436674e5a9f436f090afb1923b0c343e4193e339 /packages/integrations/mdx/test/css-head-mdx.test.js
parent21aa25c85db75733504babc61a201187e302d18a (diff)
downloadastro-44841fc281f8920b32f4b4a94deefeb3ad069cf3.tar.gz
astro-44841fc281f8920b32f4b4a94deefeb3ad069cf3.tar.zst
astro-44841fc281f8920b32f4b4a94deefeb3ad069cf3.zip
fix: conditionally import image style (#12925)
* fix: conditionally import image style * Use wrapper component for conditional style import * changeset * Add tests * Fix tests * Update markdoc tests * Lint
Diffstat (limited to 'packages/integrations/mdx/test/css-head-mdx.test.js')
-rw-r--r--packages/integrations/mdx/test/css-head-mdx.test.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/integrations/mdx/test/css-head-mdx.test.js b/packages/integrations/mdx/test/css-head-mdx.test.js
index 3123b22ce..96ee7c900 100644
--- a/packages/integrations/mdx/test/css-head-mdx.test.js
+++ b/packages/integrations/mdx/test/css-head-mdx.test.js
@@ -39,7 +39,7 @@ describe('Head injection w/ MDX', () => {
const { document } = parseHTML(html);
const links = document.querySelectorAll('head link[rel=stylesheet]');
- assert.equal(links.length, 2);
+ assert.equal(links.length, 1);
});
it('injects content from a component using Content#render()', async () => {
@@ -47,7 +47,7 @@ describe('Head injection w/ MDX', () => {
const { document } = parseHTML(html);
const links = document.querySelectorAll('head link[rel=stylesheet]');
- assert.equal(links.length, 2);
+ assert.equal(links.length, 1);
const scripts = document.querySelectorAll('script[type=module]');
assert.equal(scripts.length, 1);
@@ -79,7 +79,7 @@ describe('Head injection w/ MDX', () => {
const $ = cheerio.load(html);
const headLinks = $('head link[rel=stylesheet]');
- assert.equal(headLinks.length, 2);
+ assert.equal(headLinks.length, 1);
const bodyLinks = $('body link[rel=stylesheet]');
assert.equal(bodyLinks.length, 0);