summaryrefslogtreecommitdiff
path: root/packages/integrations/mdx/test/mdx-page.test.js
diff options
context:
space:
mode:
authorGravatar Ben Holmes <hey@bholmes.dev> 2022-08-23 13:25:35 -0400
committerGravatar GitHub <noreply@github.com> 2022-08-23 13:25:35 -0400
commitadb20797962c280d4d38f335f577fd52a1b48d4b (patch)
tree44d155e16d5d9d7c810bc3d9574890c760a7d6b9 /packages/integrations/mdx/test/mdx-page.test.js
parentca0c7e8b836b1be2db6a77698c9535a34ada8fe6 (diff)
downloadastro-adb20797962c280d4d38f335f577fd52a1b48d4b.tar.gz
astro-adb20797962c280d4d38f335f577fd52a1b48d4b.tar.zst
astro-adb20797962c280d4d38f335f577fd52a1b48d4b.zip
Fix MDX style imports when layout is not applied (#4443)
* fix: add "astro.needsHeadRendering" to MDX * test: style imports in pages without layout * chore: changeset
Diffstat (limited to 'packages/integrations/mdx/test/mdx-page.test.js')
-rw-r--r--packages/integrations/mdx/test/mdx-page.test.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/packages/integrations/mdx/test/mdx-page.test.js b/packages/integrations/mdx/test/mdx-page.test.js
index d0b0a8078..4c3605651 100644
--- a/packages/integrations/mdx/test/mdx-page.test.js
+++ b/packages/integrations/mdx/test/mdx-page.test.js
@@ -26,6 +26,15 @@ describe('MDX Page', () => {
expect(h1.textContent).to.equal('Hello page!');
});
+
+ it('injects style imports when layout is not applied', async () => {
+ const html = await fixture.readFile('/index.html');
+ const { document } = parseHTML(html);
+
+ const stylesheet = document.querySelector('link[rel="stylesheet"]');
+
+ expect(stylesheet).to.not.be.null;
+ })
});
describe('dev', () => {