Skip to content

Commit

Permalink
chore(tests): add empty heading test to avoid possible regression
Browse files Browse the repository at this point in the history
  • Loading branch information
medfreeman committed Dec 23, 2018
1 parent 942b276 commit e95afb3
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/__tests__/anchor.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,12 @@ test("markdown-it-toc-and-anchor anchor", t => {
t.is(
mdIt(
`@[toc]
# Heading`,
{
anchorLink: true,
anchorClassName: "anchor",
anchorLinkSymbol: "",
anchorLinkSymbolClassName: "octicon octicon-link",
anchorLinkSpace: false
}
# `,
{}
),
`<p></p>
<h1 id="heading"><a class="anchor" href="#heading">` +
'<span class="octicon octicon-link"></span></a>Heading</h1>\n',
<h1 id=""></h1>
`,
"should support empty heading"
);
});

0 comments on commit e95afb3

Please sign in to comment.