From 44841fc281f8920b32f4b4a94deefeb3ad069cf3 Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Wed, 8 Jan 2025 13:24:45 +0000 Subject: 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 --- packages/integrations/mdx/test/css-head-mdx.test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'packages/integrations/mdx/test/css-head-mdx.test.js') 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); -- cgit v1.2.3