Skip to content

Commit

Permalink
Add inline mdx component test (#12965)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy authored Jan 10, 2025
1 parent 4b7a2ce commit bee7df7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export const Comp = () => <span>Comp</span>

# Inline component

This is an inline component: <Comp />
5 changes: 5 additions & 0 deletions packages/integrations/mdx/test/mdx-plus-react.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,9 @@ describe('MDX and React', () => {
const errors = unhook();
assert.equal(errors.length === 0, true);
});

it('renders inline mdx component', async () => {
const html = await fixture.readFile('/inline-component/index.html');
assert.match(html, /This is an inline component: <span>Comp<\/span>/);
});
});

0 comments on commit bee7df7

Please sign in to comment.