Skip to content

Commit

Permalink
fix: snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
poyoho committed May 21, 2022
1 parent 2bed0d8 commit 5518306
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 23 deletions.
@@ -0,0 +1,25 @@
// Vitest Snapshot v1

exports[`serve:vue-sourcemap > js 1`] = `
{
"mappings": "mIAKA,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;;;;;AAGP;AACd,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;;;;;;;;;;;wBARlB,oBAAiB,WAAd,MAAU",
"sources": [
"/root/Js.vue",
],
"sourcesContent": [
"<template>
<p>&lt;js&gt;</p>
</template>
<script>
console.log('script')
</script>
<script setup>
console.log('setup')
</script>
",
],
"version": 3,
}
`;
24 changes: 1 addition & 23 deletions playground/vue-sourcemap/__tests__/serve.spec.ts
Expand Up @@ -22,29 +22,7 @@ describe.runIf(isServe)('serve:vue-sourcemap', () => {
const res = await page.request.get(new URL('./Js.vue', page.url()).href)
const js = await res.text()
const map = extractSourcemap(js)
expect(formatSourcemapForSnapshot(map)).toMatchInlineSnapshot(`
{
"mappings": "AAKA,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;;;;;AAGP;AACd,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;;;;;;;;;;;wBARlB,oBAAiB,WAAd,MAAU",
"sources": [
"/root/Js.vue",
],
"sourcesContent": [
"<template>
<p>&lt;js&gt;</p>
</template>
<script>
console.log('script')
</script>
<script setup>
console.log('setup')
</script>
",
],
"version": 3,
}
`)
expect(formatSourcemapForSnapshot(map)).toMatchSnapshot()
})

test('ts', async () => {
Expand Down

0 comments on commit 5518306

Please sign in to comment.