summaryrefslogtreecommitdiff
path: root/packages/integrations/mdx/test/mdx-plugins.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'packages/integrations/mdx/test/mdx-plugins.test.js')
-rw-r--r--packages/integrations/mdx/test/mdx-plugins.test.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/packages/integrations/mdx/test/mdx-plugins.test.js b/packages/integrations/mdx/test/mdx-plugins.test.js
index 6b15884fb..6bc8e096c 100644
--- a/packages/integrations/mdx/test/mdx-plugins.test.js
+++ b/packages/integrations/mdx/test/mdx-plugins.test.js
@@ -64,6 +64,30 @@ describe('MDX plugins', () => {
assert.notEqual(selectRehypeExample(document), null);
});
+ it('supports custom rehype plugins from integrations', async () => {
+ const fixture = await buildFixture({
+ integrations: [
+ mdx(),
+ {
+ name: 'test',
+ hooks: {
+ 'astro:config:setup': ({ updateConfig }) => {
+ updateConfig({
+ markdown: {
+ rehypePlugins: [rehypeExamplePlugin],
+ },
+ });
+ },
+ },
+ },
+ ],
+ });
+ const html = await fixture.readFile(FILE);
+ const { document } = parseHTML(html);
+
+ assert.notEqual(selectRehypeExample(document), null);
+ });
+
it('supports custom rehype plugins with namespaced attributes', async () => {
const fixture = await buildFixture({
integrations: [