Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions integration-tests/e2e/mdx-imports/mdx-imports.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ test.describe('MDX imports', () => {
expect(html).toContain('Delightful docs. Mintlify drop in replacement as a Vite plugin')
})

test('renders nested imports inside imported .md snippets', async ({ request }) => {
const response = await request.get('/')
expect(response.status()).toBe(200)
const html = await response.text()
expect(html).toContain('Outer imported markdown body.')
expect(html).toContain('Nested imported markdown works in the browser.')
})

test('renders named import from /components/', async ({ request }) => {
const response = await request.get('/')
expect(response.status()).toBe(200)
Expand Down
3 changes: 3 additions & 0 deletions integration-tests/fixtures/mdx-imports/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { CustomBadge } from '/components/custom-badge'
import Alert from '/snippets/alert'
import MarkdownSnippet from '/snippets/plain-markdown.md'
import RootReadme from '../../../README.md'
import NestedMarkdown from '/snippets/nested-outer.md'

<Above>

Expand All @@ -27,3 +28,5 @@ This page tests MDX import resolution.
<MarkdownSnippet />

<RootReadme />

<NestedMarkdown />
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Nested imported markdown works in the browser.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import Inner from './nested-inner.md'

Outer imported markdown body.

<Inner />
Loading
Loading