Skip to content

Commit

Permalink
chore(deps): upgrade vitest 2.1.8 (#3424)
Browse files Browse the repository at this point in the history
* chore(deps):  upgrade vitest 2.1.8

* chore: use @vitest/coverage-v8

* chore: update snapshot

* chore: fix

* chore: fix

* chore: update snapshot

* chore: update snapshot

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
liweijie0812 and github-actions[bot] authored Dec 28, 2024
1 parent 1d4762c commit c7088a0
Show file tree
Hide file tree
Showing 47 changed files with 705 additions and 704 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@
"@typescript-eslint/experimental-utils": "^5.4.0",
"@typescript-eslint/parser": "^5.4.0",
"@typescript-eslint/typescript-estree": "^6.16.0",
"@vitest/coverage-c8": "^0.28.3",
"@vitest/ui": "^0.24.3",
"@vitest/coverage-v8": "^2.1.8",
"@vitest/ui": "^2.1.8",
"@vue/babel-helper-vue-jsx-merge-props": "^1.2.1",
"@vue/babel-preset-jsx": "^1.2.4",
"@vue/eslint-config-typescript": "^9.1.0",
Expand Down Expand Up @@ -188,7 +188,7 @@
"vite-plugin-pwa": "^0.11.11",
"vite-plugin-tdoc": "^2.0.2",
"vite-plugin-vue2": "^2.0.3",
"vitest": "^0.26.3",
"vitest": "^2.1.8",
"vitest-fetch-mock": "^0.2.1",
"vue": "~2.6.14",
"vue-class-component": "^7.2.3",
Expand Down
6 changes: 3 additions & 3 deletions src/anchor/__tests__/__snapshots__/anchor-link.test.jsx.snap
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`AnchorItem > <slot> > test slot 1`] = `"<div id=\\"title\\"> this is title slot </div>"`;
exports[`AnchorItem > <slot> > test slot 1`] = `"<div id="title"> this is title slot </div>"`;
exports[`AnchorItem > <slot> > test slot 2`] = `"<div id=\\"default\\"> this is children content </div>"`;
exports[`AnchorItem > <slot> > test slot 2`] = `"<div id="default"> this is children content </div>"`;
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`AnchorTarget > <slot> > should render default slot 1`] = `
"<h1 id=\\"test-target\\" class=\\"t-anchor__target\\">this is default slots<svg fill=\\"none\\" viewBox=\\"0 0 24 24\\" width=\\"1em\\" height=\\"1em\\" class=\\"t-icon t-icon-file-copy t-anchor__copy\\">
<path fill=\\"currentColor\\" d=\\"M6 1h9.41L21 6.59V19H6V1zm2 2v14h11V9h-6V3H8zm7 .41V7h3.59L15 3.41zM4 5v16h11v2H2V5h2z\\"></path>
"<h1 id="test-target" class="t-anchor__target">this is default slots<svg fill="none" viewBox="0 0 24 24" width="1em" height="1em" class="t-icon t-icon-file-copy t-anchor__copy">
<path fill="currentColor" d="M6 1h9.41L21 6.59V19H6V1zm2 2v14h11V9h-6V3H8zm7 .41V7h3.59L15 3.41zM4 5v16h11v2H2V5h2z"></path>
</svg></h1>"
`;
7 changes: 4 additions & 3 deletions src/anchor/__tests__/index.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,12 @@ describe('Anchor', () => {
},
}).findComponent(Anchor);
const links = wrapper.findAllComponents(AnchorItem);

links.at(0).find('a').trigger('click');
expect(onChange).toBeCalledTimes(2);
expect(onChange).toBeCalledWith('#test-b', '');
expect(onChange).toBeCalledTimes(1);
expect(onChange).toBeCalledWith('#test-a', '');
links.at(1).find('a').trigger('click');
expect(onChange).toBeCalledTimes(3);
expect(onChange).toBeCalledTimes(2);
expect(onChange).toBeCalledWith('#test-b', '#test-a');
});
});
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[`Avatar > :props > :icon 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/badge/__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[`Badge > :props > :color 1`] = `
<div
Expand Down
2 changes: 1 addition & 1 deletion src/breadcrumb/__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[`Breadcrumb > <slot> > <separator> 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[`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
2 changes: 1 addition & 1 deletion src/checkbox/__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[`Checkbox > :props > :checked 1`] = `
<label
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
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[`DateRangePicker > :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__/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[`Form > @event > validate 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 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[`InputNumber > :props > :defaultValue, default value 6 1`] = `
<div
Expand Down
2 changes: 1 addition & 1 deletion src/input/__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[`Input > $attrs > input attrs should pass to input element 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[`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
2 changes: 1 addition & 1 deletion src/link/__tests__/__snapshots__/vitest-link.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 Component > props.content works fine 1`] = `
<a
Expand Down
2 changes: 1 addition & 1 deletion src/list/__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[`List > :props > :asyncLoading is a function, () => VNode. 1`] = `
<div
Expand Down
2 changes: 1 addition & 1 deletion src/loading/__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[`Loading > <slot> > <indicator> 1`] = `
<div
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
2 changes: 1 addition & 1 deletion src/message/__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[`Message > :props > :closeBtn is a function, () => VNode. 1`] = `
<div
Expand Down
2 changes: 1 addition & 1 deletion src/progress/__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[`Progress > :props > :color > :color is Array, equal to ["#f00", "#0ff", "#f0f"] 1`] = `
<div
Expand Down
2 changes: 1 addition & 1 deletion src/radio/__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[`Radio > :props > :checked 1`] = `
<label
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 > :bordered 1`] = `
<div
Expand Down
2 changes: 1 addition & 1 deletion src/slider/__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[`Slider > :props > 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
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 > :Tag:props > :checked 1`] = `
<div
Expand Down
2 changes: 1 addition & 1 deletion src/textarea/__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[`Textarea > $attrs > textarea attrs should pass to textarea element 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
2 changes: 1 addition & 1 deletion test/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
Loading

0 comments on commit c7088a0

Please sign in to comment.