Skip to content

Commit

Permalink
chore: update snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Feb 2, 2024
1 parent 426fbe0 commit ce4f8ad
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 37 deletions.
20 changes: 10 additions & 10 deletions test/__snapshots__/excerpt.test.ts.snap
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`excerpt > raw excerpt 1`] = `
"<template><div class=\\"markdown-body\\"><p>This is an excerpt which is kept as <strong>raw Markdown</strong>.</p>
"<template><div class="markdown-body"><p>This is an excerpt which is kept as <strong>raw Markdown</strong>.</p>
<!-- more -->
<h1>Hello</h1>
<ul>
Expand All @@ -11,18 +11,18 @@ exports[`excerpt > raw excerpt 1`] = `
</ul>
</div></template>
<script setup>
const frontmatter = {\\"title\\":\\"Hey\\"}
const frontmatter = {"title":"Hey"}
defineExpose({ frontmatter })
const excerpt = \\"\\\\nThis is an excerpt which is kept as **raw Markdown**.\\\\n\\\\n\\"
const excerpt = "\\nThis is an excerpt which is kept as **raw Markdown**.\\n\\n"
</script>
<script>
export const title = \\"Hey\\"
export const excerpt = \\"\\\\nThis is an excerpt which is kept as **raw Markdown**.\\\\n\\\\n\\"
export const title = "Hey"
export const excerpt = "\\nThis is an excerpt which is kept as **raw Markdown**.\\n\\n"
</script>"
`;

exports[`excerpt > rendered excerpt 1`] = `
"<template><div class=\\"markdown-body\\"><p>This is an excerpt which has been rendered to <strong>HTML</strong>.</p>
"<template><div class="markdown-body"><p>This is an excerpt which has been rendered to <strong>HTML</strong>.</p>
<!-- more -->
<h1>Hello</h1>
<ul>
Expand All @@ -32,12 +32,12 @@ exports[`excerpt > rendered excerpt 1`] = `
</ul>
</div></template>
<script setup>
const frontmatter = {\\"title\\":\\"Hey\\"}
const frontmatter = {"title":"Hey"}
defineExpose({ frontmatter })
const excerpt = \\"<p>This is an excerpt which has been rendered to <strong>HTML</strong>.</p>\\\\n\\"
const excerpt = "<p>This is an excerpt which has been rendered to <strong>HTML</strong>.</p>\\n"
</script>
<script>
export const title = \\"Hey\\"
export const excerpt = \\"<p>This is an excerpt which has been rendered to <strong>HTML</strong>.</p>\\\\n\\"
export const title = "Hey"
export const excerpt = "<p>This is an excerpt which has been rendered to <strong>HTML</strong>.</p>\\n"
</script>"
`;
54 changes: 27 additions & 27 deletions test/__snapshots__/transform.test.ts.snap
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`transform > basic 1`] = `
"<template><div class=\\"markdown-body\\"><h1>Hello</h1>
"<template><div class="markdown-body"><h1>Hello</h1>
<ul>
<li>A</li>
<li>B</li>
<li>C</li>
</ul>
</div></template>
<script setup>
const frontmatter = {\\"title\\":\\"Hey\\"}
const frontmatter = {"title":"Hey"}
defineExpose({ frontmatter })
</script>
<script>
export const title = \\"Hey\\"
export const title = "Hey"
</script>"
`;

exports[`transform > couldn't expose frontmatter 1`] = `
"<template><div class=\\"markdown-body\\">
"<template><div class="markdown-body">
</div></template>
<script setup>
const frontmatter = {\\"title\\":\\"Hey\\"}
const frontmatter = {"title":"Hey"}
defineExpose({ test: 'test'})
</script>
<script>
export const title = \\"Hey\\"
export const title = "Hey"
</script>"
`;

exports[`transform > escapeCodeTagInterpolation 1`] = `
"<template><div class=\\"markdown-body\\"><div>{{hello}}</div>
<pre><code class=\\"language-ts\\" v-pre>&lt;div&gt;{{hello}}&lt;/div&gt;
"<template><div class="markdown-body"><div>{{hello}}</div>
<pre><code class="language-ts" v-pre>&lt;div&gt;{{hello}}&lt;/div&gt;
</code></pre>
</div></template>
<script setup>
Expand All @@ -41,56 +41,56 @@ defineExpose({ frontmatter })
`;

exports[`transform > export keyword frontmatters 1`] = `
"<template><div class=\\"markdown-body\\"><p>Hello</p>
"<template><div class="markdown-body"><p>Hello</p>
</div></template>
<script setup>
const frontmatter = {\\"class\\":\\"text\\",\\"default\\":\\"foo\\"}
const frontmatter = {"class":"text","default":"foo"}
defineExpose({ frontmatter })
</script>
<script>
export const _class = \\"text\\"
export const _default = \\"foo\\"
export const _class = "text"
export const _default = "foo"
</script>"
`;

exports[`transform > exposes frontmatter 1`] = `
"<template><div class=\\"markdown-body\\"><h1>Hello</h1>
"<template><div class="markdown-body"><h1>Hello</h1>
</div></template>
<script setup>
const frontmatter = {\\"title\\":\\"Hey\\"}
const frontmatter = {"title":"Hey"}
defineExpose({ frontmatter })
</script>
<script>
export const title = \\"Hey\\"
export const title = "Hey"
</script>"
`;

exports[`transform > frontmatter interpolation 1`] = `
"<template><div class=\\"markdown-body\\"><h1>Hello World</h1>
"<template><div class="markdown-body"><h1>Hello World</h1>
<p>This is {{frontmatter.name}}</p>
</div></template>
<script setup>
const frontmatter = {\\"name\\":\\"My Cool App\\"}
const frontmatter = {"name":"My Cool App"}
defineExpose({ frontmatter })
</script>
<script>
export const name = \\"My Cool App\\"
export const name = "My Cool App"
</script>"
`;

exports[`transform > script setup 1`] = `
"<template><div class=\\"markdown-body\\"><h1>Hello</h1>
"<template><div class="markdown-body"><h1>Hello</h1>
</div></template>
<script setup lang=\\"ts\\">
<script setup lang="ts">
const frontmatter = {}
defineExpose({ frontmatter })
import Foo from './Foo.vue'
</script>"
`;

exports[`transform > style 1`] = `
"<template><div class=\\"markdown-body\\"><h1>Hello</h1>
"<template><div class="markdown-body"><h1>Hello</h1>
</div></template>
<script setup>
Expand All @@ -101,17 +101,17 @@ defineExpose({ frontmatter })
`;

exports[`transform > vue directives 1`] = `
"<template><div class=\\"markdown-body\\">
<p><button @click=\\"onClick\\"></button></p>
"<template><div class="markdown-body">
<p><button @click="onClick"></button></p>
</div></template>
<script setup lang=\\"ts\\">
const frontmatter = {\\"name\\":\\"My Cool App\\"}
<script setup lang="ts">
const frontmatter = {"name":"My Cool App"}
defineExpose({ frontmatter })
function onClick() {
// ...
}
</script>
<script lang=\\"ts\\">
export const name = \\"My Cool App\\"
<script lang="ts">
export const name = "My Cool App"
</script>"
`;

0 comments on commit ce4f8ad

Please sign in to comment.