Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Commit dcc3926

Browse files
committed
Fix markdown loader plugin testing
1 parent 448f88e commit dcc3926

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

plugins/markdown_test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { assertEquals } from 'std/testing/asserts.ts'
22
import markdownLoader from './markdown.ts'
33

4-
Deno.test('markdown loader', async () => {
4+
Deno.test('markdown loader for react ', async () => {
5+
Deno.env.set('ALEPH_FRAMEWORK', 'react')
56
const loader = markdownLoader()
67
const { code } = await loader.transform!({
78
url: '/test.md',
@@ -25,4 +26,5 @@ Deno.test('markdown loader', async () => {
2526
assertEquals(loader.pagePathResolve!('/pages/docs/index.md'), { path: '/docs', isIndex: true })
2627
assertEquals(code.includes('html: "<h1 id=\\"alephjs\\">Aleph.js</h1>\\n<p>The Full-stack Framework in Deno.</p>\\n"'), true)
2728
assertEquals(code.includes('MarkdownPage.meta = {"id":"mark-page-1","className":"mark-page","style":{"color":"#333"},"url":"https://alephjs.org"}'), true)
29+
Deno.env.delete('ALEPH_FRAMEWORK')
2830
})

0 commit comments

Comments
 (0)