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:
8
tests/fixtures/markdowns.js
vendored
8
tests/fixtures/markdowns.js
vendored
@@ -41,8 +41,14 @@ c = \pm\sqrt{a^2 + b^2}
|
|||||||
$$
|
$$
|
||||||
`
|
`
|
||||||
|
|
||||||
|
const checkboxes = `
|
||||||
|
- [ ] Unchecked
|
||||||
|
- [x] Checked
|
||||||
|
`
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
basic,
|
basic,
|
||||||
codeblock,
|
codeblock,
|
||||||
katex
|
katex,
|
||||||
|
checkboxes
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,3 +20,8 @@ test('Markdown.render() should renders KaTeX correctly', t => {
|
|||||||
const rendered = md.render(markdownFixtures.katex)
|
const rendered = md.render(markdownFixtures.katex)
|
||||||
t.snapshot(rendered)
|
t.snapshot(rendered)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
test('Markdown.render() should renders checkboxes', t => {
|
||||||
|
const rendered = md.render(markdownFixtures.checkboxes)
|
||||||
|
t.snapshot(rendered)
|
||||||
|
})
|
||||||
|
|||||||
@@ -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/2z8BUJZ">Twitter</a></li>␊
|
||||||
<li><a href="http://bit.ly/2jcca8t">Facebook Group</a></li>␊
|
<li><a href="http://bit.ly/2jcca8t">Facebook Group</a></li>␊
|
||||||
</ul>␊
|
</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>␊
|
||||||
|
`
|
||||||
Binary file not shown.
Reference in New Issue
Block a user