add tests

This commit is contained in:
2023-11-16 15:13:19 +01:00
parent b11f94a647
commit 47627ed330
26 changed files with 304 additions and 4 deletions

View File

@@ -0,0 +1,73 @@
// Bun Snapshot v1, https://goo.gl/fbAQLP
exports[`base no imports 1`] = `
"<h1>Some title</h1>
<ul>
<li>Some</li>
<li>List</li>
<li>Three</li>
</ul>
<blockquote>
<p>Some note</p>
</blockquote>
<table>
<thead>
<tr>
<th>Column A</th>
<th>Column B</th>
<th>Column C</th>
</tr>
</thead>
<tbody>
<tr>
<td>Some</td>
<td><code>stuff</code></td>
<td></td>
</tr>
</tbody>
</table>
"
`;
exports[`base single import 1`] = `
"<p>Here is a typescript snippet</p>
<pre><code class="language-ts">export function sum(a: number, b: number): number {
return a + b
}
</code></pre>
"
`;
exports[`base multiple imports 1`] = `
"<p>Here is a typescript snippet</p>
<pre><code class="language-ts">export function sum(a: number, b: number): number {
return a + b
}
</code></pre>
<blockquote>
<p>This is some amazing quote</p>
</blockquote>
"
`;
exports[`base custom lines 1`] = `
"<h1>Bubble sort in go</h1>
<pre><code class="language-go">func bubbleSort(arr []int) {
len := len(arr)
for i := 0; i &lt; len-1; i++ {
for j := 0; j &lt; len-i-1; j++ {
if arr[j] &gt; arr[j+1] {
arr[j], arr[j+1] = arr[j+1], arr[j]
}
}
}
fmt.Println(&quot;\nAfter Bubble Sorting&quot;)
for _, val := range arr {
fmt.Println(val)
}
}
</code></pre>
"
`;

View File

@@ -0,0 +1,40 @@
// Bun Snapshot v1, https://goo.gl/fbAQLP
exports[`options matcher custom matcher 1`] = `
"<p>This is some amazing quote</p>
"
`;
exports[`options matcher custom matcher 2`] = `
"<p>This is some amazing quote</p>
"
`;
exports[`options empty options 1`] = `
"<h1>Some title</h1>
<ul>
<li>Some</li>
<li>List</li>
<li>Three</li>
</ul>
<blockquote>
<p>Some note</p>
</blockquote>
<table>
<thead>
<tr>
<th>Column A</th>
<th>Column B</th>
<th>Column C</th>
</tr>
</thead>
<tbody>
<tr>
<td>Some</td>
<td><code>stuff</code></td>
<td></td>
</tr>
</tbody>
</table>
"
`;

View File

@@ -0,0 +1,15 @@
// Bun Snapshot v1, https://goo.gl/fbAQLP
exports[`base import different files 1`] = `
"<h1>I am gonna import different stuff</h1>
<h2>Here is a typescript snippet</h2>
<blockquote>
<p>TypeScript is a strongly typed programming language that builds on JavaScript, giving you better tooling at any scale.</p>
</blockquote>
<pre><code class="language-ts">export function sum(a: number, b: number): number {
return a + b
}
</code></pre>
"
`;