Skip to content

Commit 2fce647

Browse files
authored
chore: update vitest to 1.0.0-beta.6 (#15194)
1 parent 733fab8 commit 2fce647

File tree

8 files changed

+213
-215
lines changed

8 files changed

+213
-215
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
"unbuild": "^2.0.0",
9090
"vite": "workspace:*",
9191
"vitepress": "1.0.0-rc.31",
92-
"vitest": "^0.34.6",
92+
"vitest": "^1.0.0-beta.6",
9393
"vue": "^3.3.9"
9494
},
9595
"simple-git-hooks": {

packages/vite/src/node/__tests__/plugins/css.spec.ts

+12-12
Original file line numberDiff line numberDiff line change
@@ -193,15 +193,15 @@ describe('hoist @ rules', () => {
193193
@import "baz";`
194194
const result = await hoistAtRules(css)
195195
expect(result).toMatchInlineSnapshot(`
196-
"@charset \\"utf-8\\";@import \\"baz\\";
196+
"@charset "utf-8";@import "baz";
197197
.foo{color:red;}
198198
/*
199-
@import \\"bla\\";
199+
@import "bla";
200200
*/
201201
202202
/*
203-
@charset \\"utf-8\\";
204-
@import \\"bar\\";
203+
@charset "utf-8";
204+
@import "bar";
205205
*/
206206
"
207207
`)
@@ -271,9 +271,9 @@ import "other-module";`
271271
const replaced = replacer(code)
272272
expect(replaced.length).toBe(code.length)
273273
expect(replaced).toMatchInlineSnapshot(`
274-
"import \\"some-module\\";
274+
"import "some-module";
275275
/* empty css */
276-
import \\"other-module\\";"
276+
import "other-module";"
277277
`)
278278
})
279279

@@ -284,7 +284,7 @@ import "other-module";`
284284
const replaced = replacer(code)
285285
expect(replaced.length).toBe(code.length)
286286
expect(replaced).toMatchInlineSnapshot(
287-
'"import \\"some-module\\";/* empty css */import \\"other-module\\";"',
287+
`"import "some-module";/* empty css */import "other-module";"`,
288288
)
289289
})
290290

@@ -298,9 +298,9 @@ require("other-module");`
298298
const replaced = replacer(code)
299299
expect(replaced.length).toBe(code.length)
300300
expect(replaced).toMatchInlineSnapshot(`
301-
"require(\\"some-module\\");
301+
"require("some-module");
302302
;/* empty css */
303-
require(\\"other-module\\");"
303+
require("other-module");"
304304
`)
305305
})
306306

@@ -311,7 +311,7 @@ require("other-module");`
311311
const replaced = replacer(code)
312312
expect(replaced.length).toBe(code.length)
313313
expect(replaced).toMatchInlineSnapshot(
314-
'"require(\\"some-module\\");;/* empty css */require(\\"other-module\\");"',
314+
`"require("some-module");;/* empty css */require("other-module");"`,
315315
)
316316
})
317317

@@ -322,7 +322,7 @@ require("other-module");`
322322
const replacer = getEmptyChunkReplacer(['pure_css_chunk.js'], 'cjs')
323323
const newCode = replacer(code)
324324
expect(newCode).toMatchInlineSnapshot(
325-
'"require(\\"some-module\\"),/* empty css */require(\\"other-module\\");"',
325+
`"require("some-module"),/* empty css */require("other-module");"`,
326326
)
327327
// So there should be no pure css chunk anymore
328328
expect(newCode.match(/pure_css_chunk\.js/)).toBeNull()
@@ -334,7 +334,7 @@ require("other-module");`
334334

335335
const replacer = getEmptyChunkReplacer(['pure_css_chunk.js'], 'cjs')
336336
expect(replacer(code)).toMatchInlineSnapshot(
337-
'"require(\\"some-module\\");/* empty css */const v=require(\\"other-module\\");"',
337+
`"require("some-module");/* empty css */const v=require("other-module");"`,
338338
)
339339
})
340340
})
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
22

3-
exports[`parse positives > ? in url 1`] = `"__variableDynamicImportRuntimeHelper((import.meta.glob(\\"./mo\\\\\\\\?ds/*.js\\", {\\"as\\":\\"url\\",\\"import\\":\\"*\\"})), \`./mo?ds/\${base ?? foo}.js\`)"`;
3+
exports[`parse positives > ? in url 1`] = `"__variableDynamicImportRuntimeHelper((import.meta.glob("./mo\\\\?ds/*.js", {"as":"url","import":"*"})), \`./mo?ds/\${base ?? foo}.js\`)"`;
44
5-
exports[`parse positives > ? in variables 1`] = `"__variableDynamicImportRuntimeHelper((import.meta.glob(\\"./mods/*.js\\", {\\"as\\":\\"raw\\",\\"import\\":\\"*\\"})), \`./mods/\${base ?? foo}.js\`)"`;
5+
exports[`parse positives > ? in variables 1`] = `"__variableDynamicImportRuntimeHelper((import.meta.glob("./mods/*.js", {"as":"raw","import":"*"})), \`./mods/\${base ?? foo}.js\`)"`;
66
7-
exports[`parse positives > ? in worker 1`] = `"__variableDynamicImportRuntimeHelper((import.meta.glob(\\"./mo\\\\\\\\?ds/*.js\\", {\\"as\\":\\"worker\\",\\"import\\":\\"*\\"})), \`./mo?ds/\${base ?? foo}.js\`)"`;
7+
exports[`parse positives > ? in worker 1`] = `"__variableDynamicImportRuntimeHelper((import.meta.glob("./mo\\\\?ds/*.js", {"as":"worker","import":"*"})), \`./mo?ds/\${base ?? foo}.js\`)"`;
88
9-
exports[`parse positives > alias path 1`] = `"__variableDynamicImportRuntimeHelper((import.meta.glob(\\"./mods/*.js\\")), \`./mods/\${base}.js\`)"`;
9+
exports[`parse positives > alias path 1`] = `"__variableDynamicImportRuntimeHelper((import.meta.glob("./mods/*.js")), \`./mods/\${base}.js\`)"`;
1010
11-
exports[`parse positives > basic 1`] = `"__variableDynamicImportRuntimeHelper((import.meta.glob(\\"./mods/*.js\\")), \`./mods/\${base}.js\`)"`;
11+
exports[`parse positives > basic 1`] = `"__variableDynamicImportRuntimeHelper((import.meta.glob("./mods/*.js")), \`./mods/\${base}.js\`)"`;
1212
13-
exports[`parse positives > with ../ and itself 1`] = `"__variableDynamicImportRuntimeHelper((import.meta.glob(\\"../dynamicImportVar/*.js\\")), \`./\${name}.js\`)"`;
13+
exports[`parse positives > with ../ and itself 1`] = `"__variableDynamicImportRuntimeHelper((import.meta.glob("../dynamicImportVar/*.js")), \`./\${name}.js\`)"`;
1414
15-
exports[`parse positives > with multi ../ and itself 1`] = `"__variableDynamicImportRuntimeHelper((import.meta.glob(\\"../../plugins/dynamicImportVar/*.js\\")), \`./\${name}.js\`)"`;
15+
exports[`parse positives > with multi ../ and itself 1`] = `"__variableDynamicImportRuntimeHelper((import.meta.glob("../../plugins/dynamicImportVar/*.js")), \`./\${name}.js\`)"`;
1616
17-
exports[`parse positives > with query 1`] = `"__variableDynamicImportRuntimeHelper((import.meta.glob(\\"./mods/*.js\\", {\\"query\\":{\\"foo\\":\\"bar\\"}})), \`./mods/\${base}.js\`)"`;
17+
exports[`parse positives > with query 1`] = `"__variableDynamicImportRuntimeHelper((import.meta.glob("./mods/*.js", {"query":{"foo":"bar"}})), \`./mods/\${base}.js\`)"`;
1818
19-
exports[`parse positives > with query raw 1`] = `"__variableDynamicImportRuntimeHelper((import.meta.glob(\\"./mods/*.js\\", {\\"as\\":\\"raw\\",\\"import\\":\\"*\\"})), \`./mods/\${base}.js\`)"`;
19+
exports[`parse positives > with query raw 1`] = `"__variableDynamicImportRuntimeHelper((import.meta.glob("./mods/*.js", {"as":"raw","import":"*"})), \`./mods/\${base}.js\`)"`;
2020
21-
exports[`parse positives > with query url 1`] = `"__variableDynamicImportRuntimeHelper((import.meta.glob(\\"./mods/*.js\\", {\\"as\\":\\"url\\",\\"import\\":\\"*\\"})), \`./mods/\${base}.js\`)"`;
21+
exports[`parse positives > with query url 1`] = `"__variableDynamicImportRuntimeHelper((import.meta.glob("./mods/*.js", {"as":"url","import":"*"})), \`./mods/\${base}.js\`)"`;

0 commit comments

Comments
 (0)