Skip to content

Commit 027cfb8

Browse files
committed
test: TOC access
1 parent 7fb4414 commit 027cfb8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

test/unit/server/utils/readme.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,7 @@ describe('HTML output', () => {
572572
it('adds id to HTML heading in multi-element token', async () => {
573573
const md = '<h1 align="center">My Package</h1>\n<p align="center">A description</p>'
574574
const result = await renderReadmeHtml(md, 'test-pkg')
575+
expect(result.toc).toHaveLength(1)
575576
expect(result.html).toContain('id="user-content-my-package"')
576577
expect(result.toc[0]).toMatchObject({ text: 'My Package', depth: 1 })
577578
})

0 commit comments

Comments
 (0)