mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 01:36:22 +00:00
replace the snapshot file
This commit is contained in:
144
tests/lib/__snapshots__/markdown.test.js.snap
Normal file
144
tests/lib/__snapshots__/markdown.test.js.snap
Normal file
@@ -0,0 +1,144 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`Markdown.render() should render footnote correctly 1`] = `
|
||||
"<p data-line=\\"1\\"><sup class=\\"footnote-ref\\"><a href=\\"#fn1\\" id=\\"fnref1\\">[1]</a></sup><br />
|
||||
hello-world: <a href=\\"https://github.com/BoostIO/Boostnote/\\">https://github.com/BoostIO/Boostnote/</a></p>
|
||||
<hr class=\\"footnotes-sep\\" />
|
||||
<section class=\\"footnotes\\">
|
||||
<ol class=\\"footnotes-list\\">
|
||||
<li id=\\"fn1\\" class=\\"footnote-item\\"><p>hello-world <a href=\\"#fnref1\\" class=\\"footnote-backref\\">↩︎</a></p>
|
||||
</li>
|
||||
</ol>
|
||||
</section>
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`Markdown.render() should render line breaks correctly 1`] = `
|
||||
"<p data-line=\\"0\\">This is the first line.<br />
|
||||
This is the second line.</p>
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`Markdown.render() should render line breaks correctly 2`] = `
|
||||
"<p data-line=\\"0\\">This is the first line.
|
||||
This is the second line.</p>
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`Markdown.render() should render shortcuts correctly 1`] = `
|
||||
"<p data-line=\\"0\\"><kbd>Ctrl</kbd></p>
|
||||
<p data-line=\\"2\\"><kbd>Ctrl</kbd></p>
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`Markdown.render() should renders KaTeX correctly 1`] = `
|
||||
"<span class=\\"katex-display\\"><span class=\\"katex\\"><span class=\\"katex-mathml\\"><math><semantics><mrow><mi>c</mi><mo>=</mo><mi>p</mi><mi>m</mi><mi>s</mi><mi>q</mi><mi>r</mi><mi>t</mi><mrow><msup><mi>a</mi><mn>2</mn></msup><mo>+</mo><msup><mi>b</mi><mn>2</mn></msup></mrow></mrow><annotation encoding=\\"application/x-tex\\">c = pmsqrt{a^2 + b^2}</annotation></semantics></math></span><span class=\\"katex-html\\" aria-hidden=\\"true\\"><span class=\\"base\\"><span class=\\"strut\\" style=\\"height:0.43056em;vertical-align:0em;\\"></span><span class=\\"mord mathdefault\\">c</span><span class=\\"mspace\\" style=\\"margin-right:0.2777777777777778em;\\"></span><span class=\\"mrel\\">=</span><span class=\\"mspace\\" style=\\"margin-right:0.2777777777777778em;\\"></span></span><span class=\\"base\\"><span class=\\"strut\\" style=\\"height:1.0585479999999998em;vertical-align:-0.19444em;\\"></span><span class=\\"mord mathdefault\\">p</span><span class=\\"mord mathdefault\\">m</span><span class=\\"mord mathdefault\\">s</span><span class=\\"mord mathdefault\\" style=\\"margin-right:0.03588em;\\">q</span><span class=\\"mord mathdefault\\" style=\\"margin-right:0.02778em;\\">r</span><span class=\\"mord mathdefault\\">t</span><span class=\\"mord\\"><span class=\\"mord\\"><span class=\\"mord mathdefault\\">a</span><span class=\\"msupsub\\"><span class=\\"vlist-t\\"><span class=\\"vlist-r\\"><span class=\\"vlist\\" style=\\"height:0.8641079999999999em;\\"><span style=\\"top:-3.113em;margin-right:0.05em;\\"><span class=\\"pstrut\\" style=\\"height:2.7em;\\"></span><span class=\\"sizing reset-size6 size3 mtight\\"><span class=\\"mord mtight\\">2</span></span></span></span></span></span></span></span><span class=\\"mspace\\" style=\\"margin-right:0.2222222222222222em;\\"></span><span class=\\"mbin\\">+</span><span class=\\"mspace\\" style=\\"margin-right:0.2222222222222222em;\\"></span><span class=\\"mord\\"><span class=\\"mord mathdefault\\">b</span><span class=\\"msupsub\\"><span class=\\"vlist-t\\"><span class=\\"vlist-r\\"><span class=\\"vlist\\" style=\\"height:0.8641079999999999em;\\"><span style=\\"top:-3.113em;margin-right:0.05em;\\"><span class=\\"pstrut\\" style=\\"height:2.7em;\\"></span><span class=\\"sizing reset-size6 size3 mtight\\"><span class=\\"mord mtight\\">2</span></span></span></span></span></span></span></span></span></span></span></span></span>
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`Markdown.render() should renders abbrevations correctly 1`] = `
|
||||
"<h2 id=\\"abbr\\" data-line=\\"1\\">abbr</h2>
|
||||
<p data-line=\\"3\\">The <abbr title=\\"Hyper Text Markup Language\\">HTML</abbr> specification<br />
|
||||
is maintained by the <abbr title=\\"World Wide Web Consortium\\">W3C</abbr>.</p>
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`Markdown.render() should renders checkboxes 1`] = `
|
||||
"<ul>
|
||||
<li class=\\"taskListItem\\" data-line=\\"1\\"><input type=\\"checkbox\\" id=\\"checkbox-2\\" /> Unchecked</li>
|
||||
<li class=\\"taskListItem checked\\" data-line=\\"2\\"><input type=\\"checkbox\\" checked id=\\"checkbox-3\\" /> Checked</li>
|
||||
</ul>
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`Markdown.render() should renders codeblock correctly 1`] = `
|
||||
"<pre class=\\"code CodeMirror\\" data-line=\\"1\\">
|
||||
<span class=\\"filename\\">filename.js</span>
|
||||
<span class=\\"lineNumber CodeMirror-gutters\\"><span class=\\"CodeMirror-linenumber\\">2</span></span>
|
||||
<code class=\\"js\\">var project = 'boostnote';
|
||||
</code>
|
||||
</pre>"
|
||||
`;
|
||||
|
||||
exports[`Markdown.render() should renders definition lists correctly 1`] = `
|
||||
"<h2 id=\\"definition-list\\" data-line=\\"1\\">definition list</h2>
|
||||
<h3 id=\\"list-1\\" data-line=\\"3\\">list 1</h3>
|
||||
<dl>
|
||||
<dt data-line=\\"5\\">Term 1</dt>
|
||||
<dd data-line=\\"6\\">Definition 1</dd>
|
||||
<dt data-line=\\"8\\">Term 2</dt>
|
||||
<dd data-line=\\"9\\">Definition 2a</dd>
|
||||
<dd data-line=\\"10\\">Definition 2b</dd>
|
||||
</dl>
|
||||
<p data-line=\\"12\\">Term 3<br />
|
||||
~</p>
|
||||
<h3 id=\\"list-2\\" data-line=\\"16\\">list 2</h3>
|
||||
<dl>
|
||||
<dt data-line=\\"18\\">Term 1</dt>
|
||||
<dd data-line=\\"20\\">
|
||||
<p data-line=\\"20\\">Definition 1</p>
|
||||
</dd>
|
||||
<dt data-line=\\"22\\">Term 2 with <em>inline markup</em></dt>
|
||||
<dd data-line=\\"24\\">
|
||||
<p data-line=\\"24\\">Definition 2</p>
|
||||
<pre><code> { some code, part of Definition 2 }
|
||||
</code></pre>
|
||||
<p data-line=\\"28\\">Third paragraph of definition 2.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`Markdown.render() should renders markdown correctly 1`] = `
|
||||
"<h1 id=\\"Welcome-to-Boostnote\\" data-line=\\"1\\">Welcome to Boostnote!</h1>
|
||||
<h2 id=\\"Click-here-to-edit-markdown\\" data-line=\\"2\\">Click here to edit markdown 👋</h2>
|
||||
<iframe width=\\"560\\" height=\\"315\\" src=\\"https://www.youtube.com/embed/L0qNPLsvmyM\\" frameborder=\\"0\\" allowfullscreen></iframe>
|
||||
<h2 id=\\"Docs\\" data-line=\\"6\\">Docs 📝</h2>
|
||||
<ul>
|
||||
<li data-line=\\"7\\"><a href=\\"https://hackernoon.com/boostnote-boost-your-happiness-productivity-and-creativity-315034efeebe\\">Boostnote | Boost your happiness, productivity and creativity.</a></li>
|
||||
<li data-line=\\"8\\"><a href=\\"https://github.com/BoostIO/Boostnote/wiki/Cloud-Syncing-and-Backup\\">Cloud Syncing & Backups</a></li>
|
||||
<li data-line=\\"9\\"><a href=\\"https://github.com/BoostIO/Boostnote/wiki/Sync-Data-Across-Desktop-and-Mobile-apps\\">How to sync your data across Desktop and Mobile apps</a></li>
|
||||
<li data-line=\\"10\\"><a href=\\"https://github.com/BoostIO/Boostnote/wiki/Evernote\\">Convert data from <strong>Evernote</strong> to Boostnote.</a></li>
|
||||
<li data-line=\\"11\\"><a href=\\"https://github.com/BoostIO/Boostnote/wiki/Keyboard-Shortcuts\\">Keyboard Shortcuts</a></li>
|
||||
<li data-line=\\"12\\"><a href=\\"https://github.com/BoostIO/Boostnote/wiki/Keymaps-in-Editor-mode\\">Keymaps in Editor mode</a></li>
|
||||
<li data-line=\\"13\\"><a href=\\"https://github.com/BoostIO/Boostnote/wiki/Syntax-Highlighting\\">How to set syntax highlight in Snippet note</a></li>
|
||||
</ul>
|
||||
<hr />
|
||||
<h2 id=\\"Article-Archive\\" data-line=\\"17\\">Article Archive 📚</h2>
|
||||
<ul>
|
||||
<li data-line=\\"18\\"><a href=\\"http://bit.ly/2mOJPu7\\">Reddit English</a></li>
|
||||
<li data-line=\\"19\\"><a href=\\"https://www.reddit.com/r/boostnote_es/\\">Reddit Spanish</a></li>
|
||||
<li data-line=\\"20\\"><a href=\\"https://www.reddit.com/r/boostnote_cn/\\">Reddit Chinese</a></li>
|
||||
<li data-line=\\"21\\"><a href=\\"https://www.reddit.com/r/boostnote_jp/\\">Reddit Japanese</a></li>
|
||||
</ul>
|
||||
<hr />
|
||||
<h2 id=\\"Community\\" data-line=\\"25\\">Community 🍻</h2>
|
||||
<ul>
|
||||
<li data-line=\\"26\\"><a href=\\"http://bit.ly/2AWWzkD\\">GitHub</a></li>
|
||||
<li data-line=\\"27\\"><a href=\\"http://bit.ly/2z8BUJZ\\">Twitter</a></li>
|
||||
<li data-line=\\"28\\"><a href=\\"http://bit.ly/2jcca8t\\">Facebook Group</a></li>
|
||||
</ul>
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`Markdown.render() should renders sub correctly 1`] = `
|
||||
"<h2 id=\\"sub\\" data-line=\\"1\\">sub</h2>
|
||||
<p data-line=\\"3\\">H<sub>2</sub>0</p>
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`Markdown.render() should renders sup correctly 1`] = `
|
||||
"<h2 id=\\"sup\\" data-line=\\"1\\">sup</h2>
|
||||
<p data-line=\\"3\\">29<sup>th</sup></p>
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`Markdown.render() should text with quotes correctly 1`] = `
|
||||
"<p data-line=\\"0\\">This is a “QUOTE”.</p>
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`Markdown.render() should text with quotes correctly 2`] = `
|
||||
"<p data-line=\\"0\\">This is a "QUOTE".</p>
|
||||
"
|
||||
`;
|
||||
@@ -1,172 +0,0 @@
|
||||
# Snapshot report for `tests/lib/markdown-test.js`
|
||||
|
||||
The actual snapshot is saved in `markdown-test.js.snap`.
|
||||
|
||||
Generated by [AVA](https://ava.li).
|
||||
|
||||
## Markdown.render() should render footnote correctly
|
||||
|
||||
> Snapshot 1
|
||||
|
||||
`<p data-line="1"><sup class="footnote-ref"><a href="#fn1" id="fnref1">[1]</a></sup><br />␊
|
||||
hello-world: <a href="https://github.com/BoostIO/Boostnote/">https://github.com/BoostIO/Boostnote/</a></p>␊
|
||||
<hr class="footnotes-sep" />␊
|
||||
<section class="footnotes">␊
|
||||
<ol class="footnotes-list">␊
|
||||
<li id="fn1" class="footnote-item"><p>hello-world <a href="#fnref1" class="footnote-backref">↩︎</a></p>␊
|
||||
</li>␊
|
||||
</ol>␊
|
||||
</section>␊
|
||||
`
|
||||
|
||||
## Markdown.render() should render line breaks correctly
|
||||
|
||||
> Snapshot 1
|
||||
|
||||
`<p data-line="0">This is the first line.<br />␊
|
||||
This is the second line.</p>␊
|
||||
`
|
||||
|
||||
> Snapshot 2
|
||||
|
||||
`<p data-line="0">This is the first line.␊
|
||||
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
|
||||
|
||||
`<span class="katex-display"><span class="katex"><span class="katex-mathml"><math><semantics><mrow><mi>c</mi><mo>=</mo><mi>p</mi><mi>m</mi><mi>s</mi><mi>q</mi><mi>r</mi><mi>t</mi><mrow><msup><mi>a</mi><mn>2</mn></msup><mo>+</mo><msup><mi>b</mi><mn>2</mn></msup></mrow></mrow><annotation encoding="application/x-tex">c = pmsqrt{a^2 + b^2}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.43056em;vertical-align:0em;"></span><span class="mord mathdefault">c</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span></span><span class="base"><span class="strut" style="height:1.0585479999999998em;vertical-align:-0.19444em;"></span><span class="mord mathdefault">p</span><span class="mord mathdefault">m</span><span class="mord mathdefault">s</span><span class="mord mathdefault" style="margin-right:0.03588em;">q</span><span class="mord mathdefault" style="margin-right:0.02778em;">r</span><span class="mord mathdefault">t</span><span class="mord"><span class="mord"><span class="mord mathdefault">a</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8641079999999999em;"><span style="top:-3.113em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">2</span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2222222222222222em;"></span><span class="mbin">+</span><span class="mspace" style="margin-right:0.2222222222222222em;"></span><span class="mord"><span class="mord mathdefault">b</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8641079999999999em;"><span style="top:-3.113em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">2</span></span></span></span></span></span></span></span></span></span></span></span></span>␊
|
||||
`
|
||||
|
||||
## Markdown.render() should renders abbrevations correctly
|
||||
|
||||
> Snapshot 1
|
||||
|
||||
`<h2 id="abbr" data-line="1">abbr</h2>␊
|
||||
<p data-line="3">The <abbr title="Hyper Text Markup Language">HTML</abbr> specification<br />␊
|
||||
is maintained by the <abbr title="World Wide Web Consortium">W3C</abbr>.</p>␊
|
||||
`
|
||||
|
||||
## Markdown.render() should renders checkboxes
|
||||
|
||||
> Snapshot 1
|
||||
|
||||
`<ul>␊
|
||||
<li class="taskListItem" data-line="1"><input type="checkbox" id="checkbox-2" /> Unchecked</li>␊
|
||||
<li class="taskListItem checked" data-line="2"><input type="checkbox" checked id="checkbox-3" /> Checked</li>␊
|
||||
</ul>␊
|
||||
`
|
||||
|
||||
## Markdown.render() should renders codeblock correctly
|
||||
|
||||
> Snapshot 1
|
||||
|
||||
`<pre class="code CodeMirror" data-line="1">␊
|
||||
<span class="filename">filename.js</span>␊
|
||||
<span class="lineNumber CodeMirror-gutters"><span class="CodeMirror-linenumber">2</span></span>␊
|
||||
<code class="js">var project = 'boostnote';␊
|
||||
</code>␊
|
||||
</pre>`
|
||||
|
||||
## Markdown.render() should renders definition lists correctly
|
||||
|
||||
> Snapshot 1
|
||||
|
||||
`<h2 id="definition-list" data-line="1">definition list</h2>␊
|
||||
<h3 id="list-1" data-line="3">list 1</h3>␊
|
||||
<dl>␊
|
||||
<dt data-line="5">Term 1</dt>␊
|
||||
<dd data-line="6">Definition 1</dd>␊
|
||||
<dt data-line="8">Term 2</dt>␊
|
||||
<dd data-line="9">Definition 2a</dd>␊
|
||||
<dd data-line="10">Definition 2b</dd>␊
|
||||
</dl>␊
|
||||
<p data-line="12">Term 3<br />␊
|
||||
~</p>␊
|
||||
<h3 id="list-2" data-line="16">list 2</h3>␊
|
||||
<dl>␊
|
||||
<dt data-line="18">Term 1</dt>␊
|
||||
<dd data-line="20">␊
|
||||
<p data-line="20">Definition 1</p>␊
|
||||
</dd>␊
|
||||
<dt data-line="22">Term 2 with <em>inline markup</em></dt>␊
|
||||
<dd data-line="24">␊
|
||||
<p data-line="24">Definition 2</p>␊
|
||||
<pre><code> { some code, part of Definition 2 }␊
|
||||
</code></pre>␊
|
||||
<p data-line="28">Third paragraph of definition 2.</p>␊
|
||||
</dd>␊
|
||||
</dl>␊
|
||||
`
|
||||
|
||||
## Markdown.render() should renders markdown correctly
|
||||
|
||||
> Snapshot 1
|
||||
|
||||
`<h1 id="Welcome-to-Boostnote" data-line="1">Welcome to Boostnote!</h1>␊
|
||||
<h2 id="Click-here-to-edit-markdown" data-line="2">Click here to edit markdown 👋</h2>␊
|
||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/L0qNPLsvmyM" frameborder="0" allowfullscreen></iframe>␊
|
||||
<h2 id="Docs" data-line="6">Docs 📝</h2>␊
|
||||
<ul>␊
|
||||
<li data-line="7"><a href="https://hackernoon.com/boostnote-boost-your-happiness-productivity-and-creativity-315034efeebe">Boostnote | Boost your happiness, productivity and creativity.</a></li>␊
|
||||
<li data-line="8"><a href="https://github.com/BoostIO/Boostnote/wiki/Cloud-Syncing-and-Backup">Cloud Syncing & Backups</a></li>␊
|
||||
<li data-line="9"><a href="https://github.com/BoostIO/Boostnote/wiki/Sync-Data-Across-Desktop-and-Mobile-apps">How to sync your data across Desktop and Mobile apps</a></li>␊
|
||||
<li data-line="10"><a href="https://github.com/BoostIO/Boostnote/wiki/Evernote">Convert data from <strong>Evernote</strong> to Boostnote.</a></li>␊
|
||||
<li data-line="11"><a href="https://github.com/BoostIO/Boostnote/wiki/Keyboard-Shortcuts">Keyboard Shortcuts</a></li>␊
|
||||
<li data-line="12"><a href="https://github.com/BoostIO/Boostnote/wiki/Keymaps-in-Editor-mode">Keymaps in Editor mode</a></li>␊
|
||||
<li data-line="13"><a href="https://github.com/BoostIO/Boostnote/wiki/Syntax-Highlighting">How to set syntax highlight in Snippet note</a></li>␊
|
||||
</ul>␊
|
||||
<hr />␊
|
||||
<h2 id="Article-Archive" data-line="17">Article Archive 📚</h2>␊
|
||||
<ul>␊
|
||||
<li data-line="18"><a href="http://bit.ly/2mOJPu7">Reddit English</a></li>␊
|
||||
<li data-line="19"><a href="https://www.reddit.com/r/boostnote_es/">Reddit Spanish</a></li>␊
|
||||
<li data-line="20"><a href="https://www.reddit.com/r/boostnote_cn/">Reddit Chinese</a></li>␊
|
||||
<li data-line="21"><a href="https://www.reddit.com/r/boostnote_jp/">Reddit Japanese</a></li>␊
|
||||
</ul>␊
|
||||
<hr />␊
|
||||
<h2 id="Community" data-line="25">Community 🍻</h2>␊
|
||||
<ul>␊
|
||||
<li data-line="26"><a href="http://bit.ly/2AWWzkD">GitHub</a></li>␊
|
||||
<li data-line="27"><a href="http://bit.ly/2z8BUJZ">Twitter</a></li>␊
|
||||
<li data-line="28"><a href="http://bit.ly/2jcca8t">Facebook Group</a></li>␊
|
||||
</ul>␊
|
||||
`
|
||||
|
||||
## Markdown.render() should renders sub correctly
|
||||
|
||||
> Snapshot 1
|
||||
|
||||
`<h2 id="sub" data-line="1">sub</h2>␊
|
||||
<p data-line="3">H<sub>2</sub>0</p>␊
|
||||
`
|
||||
|
||||
## Markdown.render() should renders sup correctly
|
||||
|
||||
> Snapshot 1
|
||||
|
||||
`<h2 id="sup" data-line="1">sup</h2>␊
|
||||
<p data-line="3">29<sup>th</sup></p>␊
|
||||
`
|
||||
|
||||
## Markdown.render() should text with quotes correctly
|
||||
|
||||
> Snapshot 1
|
||||
|
||||
`<p data-line="0">This is a “QUOTE”.</p>␊
|
||||
`
|
||||
|
||||
> Snapshot 2
|
||||
|
||||
`<p data-line="0">This is a "QUOTE".</p>␊
|
||||
`
|
||||
Binary file not shown.
Reference in New Issue
Block a user