Skip to content

Commit

Permalink
Add tests for new options
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Aug 1, 2022
1 parent b72dc7c commit 3531f6d
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions test/footnote.js
Original file line number Diff line number Diff line change
Expand Up @@ -464,5 +464,35 @@ test('Footnote', (t) => {
'should support an empty `clobberPrefix`'
)

t.match(
toHtml(
// @ts-expect-error: fine.
toHast(
fromMarkdown('[^1]\n[^1]: a', {
extensions: [gfm()],
mdastExtensions: [gfmFromMarkdown()]
}),
{footnoteLabelTagName: 'h1'}
)
),
/<h1 id="footnote-label" class="sr-only">Footnotes<\/h1>/,
'should support a `footnoteLabelTagName`'
)

t.match(
toHtml(
// @ts-expect-error: fine.
toHast(
fromMarkdown('[^1]\n[^1]: a', {
extensions: [gfm()],
mdastExtensions: [gfmFromMarkdown()]
}),
{footnoteLabelProperties: {}}
)
),
/<h2>Footnotes<\/h2>/,
'should support a `footnoteLabelProperties`'
)

t.end()
})

0 comments on commit 3531f6d

Please sign in to comment.