0
Fork 0
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:
Bjorn Lu 2025-01-10 22:55:57 +08:00 committed by GitHub
parent 4b7a2ce9e7
commit bee7df7409
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 0 deletions

View file

@ -0,0 +1,5 @@
export const Comp = () => <span>Comp</span>
# Inline component
This is an inline component: <Comp />

View file

@ -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>/);
});
});