1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00

added unit test for checkbox markdown syntax

This commit is contained in:
Yu-Hung Ou
2018-03-14 21:47:07 +11:00
parent b5cb209f14
commit f72b4f0249
4 changed files with 23 additions and 2 deletions

View File

@@ -41,8 +41,14 @@ c = \pm\sqrt{a^2 + b^2}
$$
`
const checkboxes = `
- [ ] Unchecked
- [x] Checked
`
export default {
basic,
codeblock,
katex
katex,
checkboxes
}

View File

@@ -20,3 +20,8 @@ test('Markdown.render() should renders KaTeX correctly', t => {
const rendered = md.render(markdownFixtures.katex)
t.snapshot(rendered)
})
test('Markdown.render() should renders checkboxes', t => {
const rendered = md.render(markdownFixtures.checkboxes)
t.snapshot(rendered)
})

View File

@@ -51,4 +51,14 @@ Generated by [AVA](https://ava.li).
<li><a href="http://bit.ly/2z8BUJZ">Twitter</a></li>␊
<li><a href="http://bit.ly/2jcca8t">Facebook Group</a></li>␊
</ul>␊
## Markdown.render() should renders checkboxes
> Snapshot 1
`<ul>␊
<li class="taskListItem"><input type="checkbox" id="checkbox-2" /> Unchecked</li>␊
<li class="taskListItem"><input type="checkbox" checked id="checkbox-3" /> Checked</li>␊
</ul>␊
`