mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 09:46:22 +00:00
add test
This commit is contained in:
5
tests/fixtures/markdowns.js
vendored
5
tests/fixtures/markdowns.js
vendored
@@ -50,11 +50,14 @@ const smartQuotes = 'This is a "QUOTE".'
|
||||
|
||||
const breaks = 'This is the first line.\nThis is the second line.'
|
||||
|
||||
const shortcuts = '<kbd>Ctrl</kbd>\n\n[[Ctrl]]'
|
||||
|
||||
export default {
|
||||
basic,
|
||||
codeblock,
|
||||
katex,
|
||||
checkboxes,
|
||||
smartQuotes,
|
||||
breaks
|
||||
breaks,
|
||||
shortcuts
|
||||
}
|
||||
|
||||
@@ -43,3 +43,8 @@ test('Markdown.render() should render line breaks correctly', t => {
|
||||
const renderedNonBreaks = newmd.render(markdownFixtures.breaks)
|
||||
t.snapshot(renderedNonBreaks)
|
||||
})
|
||||
|
||||
test('Markdown.render() should render shortcuts correctly', t => {
|
||||
const rendered = md.render(markdownFixtures.shortcuts)
|
||||
t.snapshot(rendered)
|
||||
})
|
||||
|
||||
@@ -18,6 +18,14 @@ Generated by [AVA](https://ava.li).
|
||||
This is the second line.</p>␊
|
||||
`
|
||||
|
||||
## Markdown.render() should render shortcuts correctly
|
||||
|
||||
> Snapshot 1
|
||||
|
||||
`<p data-line="0"><kbd>Ctrl</kbd></p>␊
|
||||
<p data-line="2"><kbd>Ctrl</kbd></p>␊
|
||||
`
|
||||
|
||||
## Markdown.render() should renders KaTeX correctly
|
||||
|
||||
> Snapshot 1
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user