mirror of
https://github.com/withastro/astro.git
synced 2025-01-13 22:11:20 -05:00
Add inline mdx component test (#12965)
This commit is contained in:
parent
4b7a2ce9e7
commit
bee7df7409
2 changed files with 10 additions and 0 deletions
5
packages/integrations/mdx/test/fixtures/mdx-plus-react/src/pages/inline-component.mdx
vendored
Normal file
5
packages/integrations/mdx/test/fixtures/mdx-plus-react/src/pages/inline-component.mdx
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
export const Comp = () => <span>Comp</span>
|
||||
|
||||
# Inline component
|
||||
|
||||
This is an inline component: <Comp />
|
|
@ -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>/);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue