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

test: bump vitest v1.1.0 #12522

Merged
merged 1 commit into from
Dec 23, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/vant/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@
"@vant/icons": "workspace:*",
"@vitejs/plugin-vue": "^4.0.0",
"@vitejs/plugin-vue-jsx": "^3.0.0",
"@vitest/coverage-istanbul": "0.34.1",
"@vitest/coverage-istanbul": "^1.1.0",
"@vue/runtime-core": "^3.4.0-beta.4",
"@vue/test-utils": "^2.3.2",
"diffable-html": "^5.0.0",
"jsdom": "^22.1.0",
"typescript": "^5.0.4",
"vite": "^4.4.12",
"vitest": "0.34.2",
"vitest-canvas-mock": "^0.3.2",
"vitest": "^1.1.0",
"vitest-canvas-mock": "^0.3.3",
"vue": "^3.4.0-beta.4",
"vue-router": "^4.1.6"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`should allow to custom close icon with closeIcon prop 1`] = `
"<i class=\\"van-badge__wrapper van-icon van-icon-cross van-action-sheet__close van-haptics-feedback\\">
"<i class="van-badge__wrapper van-icon van-icon-cross van-action-sheet__close van-haptics-feedback">
<!---->
<!---->
<!---->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,10 @@ exports[`formatter prop 1`] = `
`;

exports[`popup wrapper 1`] = `
"<transition-stub name=\\"van-fade\\" appear=\\"true\\" persisted=\\"false\\" css=\\"true\\" role=\\"button\\" tabindex=\\"0\\">
"<transition-stub name="van-fade" appear="true" persisted="false" css="true" role="button" tabindex="0">
<!---->
</transition-stub>
<transition-stub name=\\"van-popup-slide-bottom\\" appear=\\"false\\" persisted=\\"false\\" css=\\"true\\">
<transition-stub name="van-popup-slide-bottom" appear="false" persisted="false" css="true">
<!---->
</transition-stub>"
`;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`should change close icon when using close-icon prop 1`] = `
"<i class=\\"van-badge__wrapper van-icon van-icon-success van-cascader__close-icon van-haptics-feedback\\">
"<i class="van-badge__wrapper van-icon van-icon-success van-cascader__close-icon van-haptics-feedback">
<!---->
<!---->
<!---->
</i>"
`;

exports[`should render option slot correctly 1`] = `
"<li role=\\"menuitemradio\\" class=\\"van-cascader__option\\" tabindex=\\"-1\\" aria-checked=\\"false\\">Custom Option foo
"<li role="menuitemradio" class="van-cascader__option" tabindex="-1" aria-checked="false">Custom Option foo
<!---->
</li>"
`;
Expand Down Expand Up @@ -48,7 +48,7 @@ exports[`should render options-top、options-bottom slots correctly 1`] = `
</div>
`;

exports[`should render title slot correctly 1`] = `"<h2 class=\\"van-cascader__title\\">Custom Title</h2>"`;
exports[`should render title slot correctly 1`] = `"<h2 class="van-cascader__title">Custom Title</h2>"`;

exports[`should select correct option when value changed 1`] = `
<li
Expand Down
4 changes: 2 additions & 2 deletions packages/vant/src/cell/test/__snapshots__/index.spec.ts.snap
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`should change arrow direction when using arrow-direction prop 1`] = `
"<i class=\\"van-badge__wrapper van-icon van-icon-arrow-down van-cell__right-icon\\">
"<i class="van-badge__wrapper van-icon van-icon-arrow-down van-cell__right-icon">
<!---->
<!---->
<!---->
Expand Down Expand Up @@ -41,7 +41,7 @@ exports[`should render label slot correctly 1`] = `
`;

exports[`should render tag prop correctly 1`] = `
"<a class=\\"van-cell\\">
"<a class="van-cell">
<!---->
<!---->
<!---->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ exports[`should change icon class-prefix when using icon-prefix prop 1`] = `
`;

exports[`should render tag prop correctly 1`] = `
"<section class=\\"van-config-provider\\">
"<section class="van-config-provider">
<!---->
</section>"
`;
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`should change clear icon when using clear-icon prop 1`] = `
"<i class=\\"van-badge__wrapper van-icon van-icon-cross van-field__clear\\">
"<i class="van-badge__wrapper van-icon van-icon-cross van-field__clear">
<!---->
<!---->
<!---->
Expand Down
12 changes: 6 additions & 6 deletions packages/vant/src/icon/test/__snapshots__/index.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ exports[`should render badge correctly 1`] = `
`;

exports[`should render default slot correctly 1`] = `
"<i class=\\"van-badge__wrapper van-icon van-icon-success\\">Default Slot
"<i class="van-badge__wrapper van-icon van-icon-success">Default Slot
<!---->
<!---->
</i>"
Expand All @@ -19,23 +19,23 @@ exports[`should render dot correctly 1`] = `
`;

exports[`should render icon with builtin icon name correctly 1`] = `
"<i class=\\"van-badge__wrapper van-icon van-icon-success\\">
"<i class="van-badge__wrapper van-icon van-icon-success">
<!---->
<!---->
<!---->
</i>"
`;

exports[`should render icon with local image correctly 1`] = `
"<i class=\\"van-badge__wrapper van-icon\\">
<!----><img class=\\"van-icon__image\\" src=\\"/assets/icon.jpg\\">
"<i class="van-badge__wrapper van-icon">
<!----><img class="van-icon__image" src="/assets/icon.jpg">
<!---->
</i>"
`;

exports[`should render icon with url name correctly 1`] = `
"<i class=\\"van-badge__wrapper van-icon\\">
<!----><img class=\\"van-icon__image\\" src=\\"https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg\\">
"<i class="van-badge__wrapper van-icon">
<!----><img class="van-icon__image" src="https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg">
<!---->
</i>"
`;
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ exports[`render image 1`] = `
`;

exports[`should change close icon position when using close-icon-position prop 1`] = `
"<i class=\\"van-badge__wrapper van-icon van-icon-clear van-image-preview__close-icon van-image-preview__close-icon--top-left van-haptics-feedback\\" role=\\"button\\">
"<i class="van-badge__wrapper van-icon van-icon-clear van-image-preview__close-icon van-image-preview__close-icon--top-left van-haptics-feedback" role="button">
<!---->
<!---->
<!---->
</i>"
`;

exports[`should change close icon when using close-icon prop 1`] = `
"<i class=\\"van-badge__wrapper van-icon van-icon-success van-image-preview__close-icon van-image-preview__close-icon--top-right van-haptics-feedback\\" role=\\"button\\">
"<i class="van-badge__wrapper van-icon van-icon-success van-image-preview__close-icon van-image-preview__close-icon--top-right van-haptics-feedback" role="button">
<!---->
<!---->
<!---->
Expand Down
4 changes: 2 additions & 2 deletions packages/vant/src/image/test/__snapshots__/index.spec.ts.snap
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`should apply icon-prefix prop to error-icon 1`] = `
"<i class=\\"van-badge__wrapper my-icon my-icon-error van-image__error-icon\\">
"<i class="van-badge__wrapper my-icon my-icon-error van-image__error-icon">
<!---->
<!---->
<!---->
</i>"
`;

exports[`should apply icon-prefix prop to loading-icon 1`] = `
"<i class=\\"van-badge__wrapper my-icon my-icon-success van-image__loading-icon\\">
"<i class="van-badge__wrapper my-icon my-icon-success van-image__loading-icon">
<!---->
<!---->
<!---->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ exports[`should render demo and match snapshot 1`] = `
Y
</span>
<span
class="van-index-bar__index van-index-bar__index--active"
class="van-index-bar__index"
data-index="Z"
>
Z
Expand Down Expand Up @@ -908,8 +908,8 @@ exports[`should render demo and match snapshot 1`] = `
</div>
</div>
<div>
<div style="height: 0px;">
<div class="van-index-anchor van-index-anchor--sticky van-hairline--bottom">
<div>
<div class="van-index-anchor">
Z
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ exports[`should allow to disable lazy-render 1`] = `
`;

exports[`should render default slot correctly 1`] = `
"<transition-stub name=\\"van-fade\\" appear=\\"true\\" persisted=\\"false\\" css=\\"true\\">
"<transition-stub name="van-fade" appear="true" persisted="false" css="true">
<!---->
</transition-stub>"
`;
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ exports[`should change icon class prefix when using icon-prefix prop 1`] = `
</transition-stub>
`;

exports[`should locate to reference element when showed 1`] = `"<!----><transition-stub name=\\"van-popover-zoom\\" appear=\\"false\\" persisted=\\"false\\" css=\\"true\\"><!----></transition-stub>"`;
exports[`should locate to reference element when showed 1`] = `"<!----><transition-stub name="van-popover-zoom" appear="false" persisted="false" css="true"><!----></transition-stub>"`;

exports[`should locate to reference element when showed 2`] = `
<transition-stub
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ exports[`should change icon class prefix when using icon-prefix prop 1`] = `
`;

exports[`should render correct close icon when using close-icon prop 1`] = `
"<i class=\\"van-badge__wrapper van-icon van-icon-success van-popup__close-icon van-popup__close-icon--top-right van-haptics-feedback\\" role=\\"button\\" tabindex=\\"0\\">
"<i class="van-badge__wrapper van-icon van-icon-success van-popup__close-icon van-popup__close-icon--top-right van-haptics-feedback" role="button" tabindex="0">
<!---->
<!---->
<!---->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ exports[`should render action text when using action-text prop 1`] = `
</div>
`;

exports[`should render label slot correctly 1`] = `"<label class=\\"van-search__label\\" for=\\"van-search-input\\">Custom Label</label>"`;
exports[`should render label slot correctly 1`] = `"<label class="van-search__label" for="van-search-input">Custom Label</label>"`;

exports[`should render left icon when using left-icon prop 1`] = `
<div class="van-field__left-icon">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`should skeleton title works 1`] = `"<h3 class=\\"van-skeleton-title\\"></h3>"`;
exports[`should skeleton title works 1`] = `"<h3 class="van-skeleton-title"></h3>"`;

exports[`should skeleton title works with props 1`] = `"<h3 class=\\"van-skeleton-title van-skeleton-title--round\\" style=\\"width: 200rem;\\"></h3>"`;
exports[`should skeleton title works with props 1`] = `"<h3 class="van-skeleton-title van-skeleton-title--round" style="width: 200rem;"></h3>"`;
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`should hide tag when the show prop is false 1`] = `
"<transition-stub appear=\\"false\\" persisted=\\"false\\" css=\\"true\\">
"<transition-stub appear="false" persisted="false" css="true">
<!---->
</transition-stub>"
`;
Expand Down