Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: upgrade vitest to enable running single unit test #4807

Merged
merged 3 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
"@typescript-eslint/parser": "^4.33.0",
"@vitejs/plugin-vue": "^2.3.4",
"@vitejs/plugin-vue-jsx": "^1.3.10",
"@vitest/ui": "^0.14.2",
"@vitest/ui": "^2.1.8",
"@vue/babel-plugin-jsx": "1.2.2",
"@vue/compiler-sfc": "^3.3.4",
"@vue/eslint-config-typescript": "^10.0.0",
Expand Down Expand Up @@ -184,7 +184,7 @@
"vite": "^2.9.16",
"vite-plugin-pwa": "^0.12.8",
"vite-plugin-tdoc": "^2.0.4",
"vitest": "^0.14.2",
"vitest": "^2.1.8",
"vitest-fetch-mock": "^0.1.0",
"vue": "3.3.9",
"vue-router": "^4.2.4",
Expand Down
2 changes: 1 addition & 1 deletion src/avatar/__tests__/__snapshots__/index.test.jsx.snap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`AvatarGroup > :props > :placement 1`] = `
<div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`Avatar Component > props.content works fine 1`] = `
<div
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`BackTop Component > props.content works fine 1`] = `
<button
Expand Down
2 changes: 1 addition & 1 deletion src/button/__tests__/__snapshots__/index.test.jsx.snap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`Button > :props > :block 1`] = `
<button
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`Button Component > props.block works fine 1`] = `
<button
Expand Down
2 changes: 1 addition & 1 deletion src/calendar/__tests__/__snapshots__/index.test.jsx.snap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`Calendar > :props > :cell 1`] = `
<div
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`DatePicker > :mode 1`] = `
<div
Expand Down
2 changes: 1 addition & 1 deletion src/divider/__tests__/__snapshots__/index.test.jsx.snap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`Divider > :props > :align 1`] = `
<div
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`Divider Component > props.align is equal to center 1`] = `
<div
Expand Down
2 changes: 1 addition & 1 deletion src/form/__tests__/__snapshots__/form.test.jsx.snap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`Form > @event > submit 1`] = `
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`Guide Component > GuideStep.body works fine 1`] = `
<body
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`Image-viewer > :props > defaultVisible 1`] = `
<div
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`Image Component > props.fit is equal to contain 1`] = `
<img
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`Input Component > props.align is equal to center 1`] = `
<div
Expand Down
2 changes: 1 addition & 1 deletion src/link/__tests__/__snapshots__/index.test.jsx.snap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`Link > :props > :content 1`] = `
<div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`Link Component > props.content works fine 1`] = `
<a
Expand Down
2 changes: 1 addition & 1 deletion src/menu/__tests__/__snapshots__/head-menu.test.jsx.snap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`HeadMenu > props > :active 1`] = `
<div
Expand Down
2 changes: 1 addition & 1 deletion src/menu/__tests__/__snapshots__/menu-item.test.jsx.snap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`MenuItem > props > :disabled 1`] = `
<div
Expand Down
2 changes: 1 addition & 1 deletion src/menu/__tests__/__snapshots__/menu.test.jsx.snap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`Menu > props > :active 1`] = `
<div
Expand Down
2 changes: 1 addition & 1 deletion src/menu/__tests__/__snapshots__/submenu.test.jsx.snap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`Submenu > props > :disabled 1`] = `
<li
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`Radio Component > props.checked is equal to true 1`] = `
<label
Expand Down
2 changes: 1 addition & 1 deletion src/select/__tests__/__snapshots__/index.test.jsx.snap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`Select > :props > :borderless 1`] = `
<div
Expand Down
2 changes: 1 addition & 1 deletion src/swiper/__tests__/__snapshots__/index.test.jsx.snap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`Swiper > :props > :animation fade 1`] = `
<div
Expand Down
2 changes: 1 addition & 1 deletion src/switch/__tests__/__snapshots__/index.test.jsx.snap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`Switch > :props > :customValue 1`] = `
<div
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`BaseTable Component > props.showHeader: BaseTable contains element \`thead\` 1`] = `
<div
Expand Down
2 changes: 1 addition & 1 deletion src/tabs/__tests__/__snapshots__/index.test.jsx.snap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`Tabs > :props > :addable 1`] = `
<div
Expand Down
2 changes: 1 addition & 1 deletion src/tag/__tests__/__snapshots__/index.test.jsx.snap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`Tag or CheckTag > @event: Tag > Event passthrough: close 1`] = `
<div
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`TimelineItem Component > props.content works fine 1`] = `
<li
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`TreeSelect > :props > :clearable 1`] = `
<div
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`Upload Component > props.draggable: theme=image & draggable=true, fail file render fine 1`] = `
<div
Expand Down
4 changes: 2 additions & 2 deletions test/unit/snap/__snapshots__/csr.test.js.snap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`csr snapshot test > csr test ./src/affix/_example/base.vue 1`] = `
<div
Expand Down Expand Up @@ -157054,7 +157054,7 @@ exports[`csr snapshot test > csr test ./src/table/_example/tree.vue 1`] = `
} = params;
if (lazyLoadingData.value && lazyLoadingData.value.key === row?.key) {
return __vite_ssr_import_0__.createVNode(__vite_ssr_import_2__.Loading, {
\\"size\\": \\"14px\\"
"size": "14px"
}, null);
}
return type === 'expand' ? __vite_ssr_import_0__.createVNode(__vite_ssr_import_3__.AddRectangleIcon, null, null) : __vite_ssr_import_0__.createVNode(__vite_ssr_import_3__.MinusRectangleIcon, null, null);
Expand Down
Loading
Loading