Skip to content

Commit c60119f

Browse files
authored
chore: restore sourcemap tests (#266)
1 parent 9cce3f9 commit c60119f

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

playground/vue-sourcemap/__tests__/__snapshots__/vue-sourcemap.spec.ts.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ exports[`serve:vue-sourcemap > js > serve-js 1`] = `
145145
{
146146
"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",
147147
"sources": [
148-
"/root/Js.vue",
148+
"Js.vue",
149149
],
150150
"sourcesContent": [
151151
"<template>
@@ -192,7 +192,7 @@ exports[`serve:vue-sourcemap > no script > serve-no-script 1`] = `
192192
"mappings": ";;;wBACE,oBAAwB,WAArB,aAAiB",
193193
"sourceRoot": "",
194194
"sources": [
195-
"/root/NoScript.vue",
195+
"NoScript.vue",
196196
],
197197
"sourcesContent": [
198198
"<template>
@@ -208,7 +208,7 @@ exports[`serve:vue-sourcemap > no template > serve-no-template 1`] = `
208208
{
209209
"mappings": "AACA,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;;;;;;;",
210210
"sources": [
211-
"/root/NoTemplate.vue",
211+
"NoTemplate.vue",
212212
],
213213
"sourcesContent": [
214214
"<script>
@@ -314,7 +314,7 @@ exports[`serve:vue-sourcemap > ts > serve-ts 1`] = `
314314
{
315315
"mappings": ";AAKA,QAAQ,IAAI,WAAW;;;;;AAIvB,YAAQ,IAAI,UAAU;;;;;;;;uBARpB,oBAAiB,WAAd,MAAU",
316316
"sources": [
317-
"/root/Ts.vue",
317+
"Ts.vue",
318318
],
319319
"sourcesContent": [
320320
"<template>

playground/vue-sourcemap/__tests__/vue-sourcemap.spec.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,14 @@ describe.runIf(isServe)('serve:vue-sourcemap', () => {
2121
throw new Error('Style not found: ' + content)
2222
}
2323

24-
// Temporal skip after https://github.com/vitejs/vite/pull/12079
25-
test.skip('js', async () => {
24+
test('js', async () => {
2625
const res = await page.request.get(new URL('./Js.vue', page.url()).href)
2726
const js = await res.text()
2827
const map = extractSourcemap(js)
2928
expect(formatSourcemapForSnapshot(map)).toMatchSnapshot('serve-js')
3029
})
3130

32-
// Temporal skip after https://github.com/vitejs/vite/pull/12079
33-
test.skip('ts', async () => {
31+
test('ts', async () => {
3432
const res = await page.request.get(new URL('./Ts.vue', page.url()).href)
3533
const js = await res.text()
3634
const map = extractSourcemap(js)
@@ -93,8 +91,7 @@ describe.runIf(isServe)('serve:vue-sourcemap', () => {
9391
)
9492
})
9593

96-
// Temporal skip after https://github.com/vitejs/vite/pull/12079
97-
test.skip('no script', async () => {
94+
test('no script', async () => {
9895
const res = await page.request.get(
9996
new URL('./NoScript.vue', page.url()).href,
10097
)
@@ -103,8 +100,7 @@ describe.runIf(isServe)('serve:vue-sourcemap', () => {
103100
expect(formatSourcemapForSnapshot(map)).toMatchSnapshot('serve-no-script')
104101
})
105102

106-
// Temporal skip after https://github.com/vitejs/vite/pull/12079
107-
test.skip('no template', async () => {
103+
test('no template', async () => {
108104
const res = await page.request.get(
109105
new URL('./NoTemplate.vue', page.url()).href,
110106
)

0 commit comments

Comments
 (0)