Skip to content

Commit 47f93ba

Browse files
committed
test: add heading tests
1 parent 4587451 commit 47f93ba

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/features/parser-markdown.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,19 @@ export const testMarkdownParser = () => {
6868
expect(parsed.body).toHaveProperty('children')
6969
expect(parsed.body.children.length).toEqual(0)
7070
})
71+
72+
test('h1 tags', async () => {
73+
const parsed = await $fetch('/api/parse', {
74+
method: 'POST',
75+
body: {
76+
id: 'content:index.md',
77+
content: '<h1>Hello</h1>'
78+
}
79+
})
80+
81+
expect(parsed.body).toHaveProperty('children')
82+
expect(parsed.body.children.length).toEqual(1)
83+
expect(parsed.body.children[0].tag).toEqual('h1')
84+
})
7185
})
7286
}

0 commit comments

Comments
 (0)