From 3db0a0f97955d6554a95cddceecfc49c1ec4386c Mon Sep 17 00:00:00 2001 From: edison Date: Mon, 16 Sep 2024 15:00:41 +0800 Subject: [PATCH] chore(deps): update vitest to ^2.1.1 (#11943) --- package.json | 10 +- .../__tests__/components/Teleport.spec.ts | 218 ++++++++---------- pnpm-lock.yaml | 160 ++++++++----- vitest.e2e.config.ts | 1 + vitest.unit.config.ts | 1 + 5 files changed, 206 insertions(+), 184 deletions(-) diff --git a/package.json b/package.json index 654394ff946..249064314db 100644 --- a/package.json +++ b/package.json @@ -17,11 +17,11 @@ "format": "prettier --write --cache .", "format-check": "prettier --check --cache .", "test": "vitest", - "test-unit": "vitest -c vitest.unit.config.ts", - "test-e2e": "node scripts/build.js vue -f global -d && vitest -c vitest.e2e.config.ts", + "test-unit": "vitest --project unit", + "test-e2e": "node scripts/build.js vue -f global -d && vitest --project e2e", "test-dts": "run-s build-dts test-dts-only", "test-dts-only": "tsc -p packages-private/dts-built-test/tsconfig.json && tsc -p ./packages-private/dts-test/tsconfig.test.json", - "test-coverage": "vitest run -c vitest.unit.config.ts --coverage", + "test-coverage": "vitest run --project unit --coverage", "test-bench": "vitest bench", "release": "node scripts/release.js", "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s", @@ -71,7 +71,7 @@ "@types/node": "^20.16.5", "@types/semver": "^7.5.8", "@types/serve-handler": "^6.1.4", - "@vitest/coverage-v8": "^2.0.5", + "@vitest/coverage-v8": "^2.1.1", "@vue/consolidate": "1.0.0", "conventional-changelog-cli": "^5.0.0", "enquirer": "^2.4.1", @@ -107,7 +107,7 @@ "typescript": "~5.6.2", "typescript-eslint": "^8.5.0", "vite": "catalog:", - "vitest": "^2.0.5" + "vitest": "^2.1.1" }, "pnpm": { "peerDependencyRules": { diff --git a/packages/runtime-core/__tests__/components/Teleport.spec.ts b/packages/runtime-core/__tests__/components/Teleport.spec.ts index d2532a6db7c..5dc333ad690 100644 --- a/packages/runtime-core/__tests__/components/Teleport.spec.ts +++ b/packages/runtime-core/__tests__/components/Teleport.spec.ts @@ -111,12 +111,10 @@ describe('renderer: teleport', () => { root, ) - expect(serializeInner(root)).toMatchInlineSnapshot( - `"
root
"`, - ) - expect(serializeInner(target)).toMatchInlineSnapshot( - `"
teleported
"`, + expect(serializeInner(root)).toBe( + `
root
`, ) + expect(serializeInner(target)).toBe(`
teleported
`) }) test('should work with SVG', async () => { @@ -142,8 +140,8 @@ describe('renderer: teleport', () => { await nextTick() - expect(root.innerHTML).toMatchInlineSnapshot( - `""`, + expect(root.innerHTML).toBe( + ``, ) expect(svg.value.namespaceURI).toBe('http://www.w3.org/2000/svg') @@ -164,24 +162,20 @@ describe('renderer: teleport', () => { root, ) - expect(serializeInner(root)).toMatchInlineSnapshot( - `"
root
"`, + expect(serializeInner(root)).toBe( + `
root
`, ) - expect(serializeInner(targetA)).toMatchInlineSnapshot( - `"
teleported
"`, - ) - expect(serializeInner(targetB)).toMatchInlineSnapshot(`""`) + expect(serializeInner(targetA)).toBe(`
teleported
`) + expect(serializeInner(targetB)).toBe(``) target.value = targetB await nextTick() - expect(serializeInner(root)).toMatchInlineSnapshot( - `"
root
"`, - ) - expect(serializeInner(targetA)).toMatchInlineSnapshot(`""`) - expect(serializeInner(targetB)).toMatchInlineSnapshot( - `"
teleported
"`, + expect(serializeInner(root)).toBe( + `
root
`, ) + expect(serializeInner(targetA)).toBe(``) + expect(serializeInner(targetB)).toBe(`
teleported
`) }) test('should update children', async () => { @@ -193,19 +187,17 @@ describe('renderer: teleport', () => { h(() => h(Teleport, { to: target }, children.value)), root, ) - expect(serializeInner(target)).toMatchInlineSnapshot( - `"
teleported
"`, - ) + expect(serializeInner(target)).toBe(`
teleported
`) children.value = [] await nextTick() - expect(serializeInner(target)).toMatchInlineSnapshot(`""`) + expect(serializeInner(target)).toBe(``) children.value = [createVNode(Text, null, 'teleported')] await nextTick() - expect(serializeInner(target)).toMatchInlineSnapshot(`"teleported"`) + expect(serializeInner(target)).toBe(`teleported`) }) test('should remove children when unmounted', () => { @@ -220,8 +212,8 @@ describe('renderer: teleport', () => { ]), root, ) - expect(serializeInner(target)).toMatchInlineSnapshot( - props.disabled ? `""` : `"
teleported
"`, + expect(serializeInner(target)).toBe( + props.disabled ? `` : `
teleported
`, ) render(null, root) @@ -248,7 +240,7 @@ describe('renderer: teleport', () => { h(() => [h(Teleport, { to: target }, h(Comp)), h('div', 'root')]), root, ) - expect(serializeInner(target)).toMatchInlineSnapshot(`"

"`) + expect(serializeInner(target)).toBe(`

`) render(null, root) expect(serializeInner(target)).toBe('') @@ -291,12 +283,10 @@ describe('renderer: teleport', () => { root, ) - expect(serializeInner(root)).toMatchInlineSnapshot( - `"
"`, - ) - expect(serializeInner(target)).toMatchInlineSnapshot( - `"
one
two"`, + expect(serializeInner(root)).toBe( + `
`, ) + expect(serializeInner(target)).toBe(`
one
two`) // update existing content render( @@ -306,16 +296,14 @@ describe('renderer: teleport', () => { ]), root, ) - expect(serializeInner(target)).toMatchInlineSnapshot( - `"
one
two
three"`, - ) + expect(serializeInner(target)).toBe(`
one
two
three`) // toggling render(h('div', [null, h(Teleport, { to: target }, 'three')]), root) - expect(serializeInner(root)).toMatchInlineSnapshot( - `"
"`, + expect(serializeInner(root)).toBe( + `
`, ) - expect(serializeInner(target)).toMatchInlineSnapshot(`"three"`) + expect(serializeInner(target)).toBe(`three`) // toggle back render( @@ -325,13 +313,11 @@ describe('renderer: teleport', () => { ]), root, ) - expect(serializeInner(root)).toMatchInlineSnapshot( - `"
"`, + expect(serializeInner(root)).toBe( + `
`, ) // should append - expect(serializeInner(target)).toMatchInlineSnapshot( - `"three
one
two
"`, - ) + expect(serializeInner(target)).toBe(`three
one
two
`) // toggle the other teleport render( @@ -341,12 +327,10 @@ describe('renderer: teleport', () => { ]), root, ) - expect(serializeInner(root)).toMatchInlineSnapshot( - `"
"`, - ) - expect(serializeInner(target)).toMatchInlineSnapshot( - `"
one
two
"`, + expect(serializeInner(root)).toBe( + `
`, ) + expect(serializeInner(target)).toBe(`
one
two
`) }) test('should work when using template ref as target', async () => { @@ -368,14 +352,14 @@ describe('renderer: teleport', () => { }, } render(h(App), root) - expect(serializeInner(root)).toMatchInlineSnapshot( - `"
teleported
"`, + expect(serializeInner(root)).toBe( + `
teleported
`, ) disabled.value = false await nextTick() - expect(serializeInner(root)).toMatchInlineSnapshot( - `"
teleported
"`, + expect(serializeInner(root)).toBe( + `
teleported
`, ) }) @@ -391,27 +375,23 @@ describe('renderer: teleport', () => { } render(renderWithDisabled(false), root) - expect(serializeInner(root)).toMatchInlineSnapshot( - `"
root
"`, - ) - expect(serializeInner(target)).toMatchInlineSnapshot( - `"
teleported
"`, + expect(serializeInner(root)).toBe( + `
root
`, ) + expect(serializeInner(target)).toBe(`
teleported
`) render(renderWithDisabled(true), root) - expect(serializeInner(root)).toMatchInlineSnapshot( - `"
teleported
root
"`, + expect(serializeInner(root)).toBe( + `
teleported
root
`, ) expect(serializeInner(target)).toBe(``) // toggle back render(renderWithDisabled(false), root) - expect(serializeInner(root)).toMatchInlineSnapshot( - `"
root
"`, - ) - expect(serializeInner(target)).toMatchInlineSnapshot( - `"
teleported
"`, + expect(serializeInner(root)).toBe( + `
root
`, ) + expect(serializeInner(target)).toBe(`
teleported
`) }) test('moving teleport while enabled', () => { @@ -425,12 +405,10 @@ describe('renderer: teleport', () => { ]), root, ) - expect(serializeInner(root)).toMatchInlineSnapshot( - `"
root
"`, - ) - expect(serializeInner(target)).toMatchInlineSnapshot( - `"
teleported
"`, + expect(serializeInner(root)).toBe( + `
root
`, ) + expect(serializeInner(target)).toBe(`
teleported
`) render( h(Fragment, [ @@ -439,12 +417,10 @@ describe('renderer: teleport', () => { ]), root, ) - expect(serializeInner(root)).toMatchInlineSnapshot( - `"
root
"`, - ) - expect(serializeInner(target)).toMatchInlineSnapshot( - `"
teleported
"`, + expect(serializeInner(root)).toBe( + `
root
`, ) + expect(serializeInner(target)).toBe(`
teleported
`) render( h(Fragment, [ @@ -453,12 +429,10 @@ describe('renderer: teleport', () => { ]), root, ) - expect(serializeInner(root)).toMatchInlineSnapshot( - `"
root
"`, - ) - expect(serializeInner(target)).toMatchInlineSnapshot( - `"
teleported
"`, + expect(serializeInner(root)).toBe( + `
root
`, ) + expect(serializeInner(target)).toBe(`
teleported
`) }) test('moving teleport while disabled', () => { @@ -472,8 +446,8 @@ describe('renderer: teleport', () => { ]), root, ) - expect(serializeInner(root)).toMatchInlineSnapshot( - `"
teleported
root
"`, + expect(serializeInner(root)).toBe( + `
teleported
root
`, ) expect(serializeInner(target)).toBe('') @@ -484,8 +458,8 @@ describe('renderer: teleport', () => { ]), root, ) - expect(serializeInner(root)).toMatchInlineSnapshot( - `"
root
teleported
"`, + expect(serializeInner(root)).toBe( + `
root
teleported
`, ) expect(serializeInner(target)).toBe('') @@ -496,8 +470,8 @@ describe('renderer: teleport', () => { ]), root, ) - expect(serializeInner(root)).toMatchInlineSnapshot( - `"
teleported
root
"`, + expect(serializeInner(root)).toBe( + `
teleported
root
`, ) expect(serializeInner(target)).toBe('') }) @@ -522,28 +496,28 @@ describe('renderer: teleport', () => { `), } render(h(App), root) - expect(serializeInner(root)).toMatchInlineSnapshot( - `"
root
"`, + expect(serializeInner(root)).toBe( + `
root
`, ) - expect(serializeInner(target)).toMatchInlineSnapshot( - `"
teleported
false"`, + expect(serializeInner(target)).toBe( + `
teleported
false`, ) disabled.value = true await nextTick() - expect(serializeInner(root)).toMatchInlineSnapshot( - `"
teleported
true
root
"`, + expect(serializeInner(root)).toBe( + `
teleported
true
root
`, ) expect(serializeInner(target)).toBe(``) // toggle back disabled.value = false await nextTick() - expect(serializeInner(root)).toMatchInlineSnapshot( - `"
root
"`, + expect(serializeInner(root)).toBe( + `
root
`, ) - expect(serializeInner(target)).toMatchInlineSnapshot( - `"
teleported
false"`, + expect(serializeInner(target)).toBe( + `
teleported
false`, ) }) @@ -570,18 +544,18 @@ describe('renderer: teleport', () => { }) app.mount(root) - expect(serializeInner(root)).toMatchInlineSnapshot( - `""`, + expect(serializeInner(root)).toBe( + ``, ) - expect(serializeInner(target)).toMatchInlineSnapshot(`"
foo
"`) + expect(serializeInner(target)).toBe(`
foo
`) await nextTick() expect(dir.mounted).toHaveBeenCalledTimes(1) expect(dir.unmounted).toHaveBeenCalledTimes(0) toggle.value = false await nextTick() - expect(serializeInner(root)).toMatchInlineSnapshot(`""`) - expect(serializeInner(target)).toMatchInlineSnapshot(`""`) + expect(serializeInner(root)).toBe(``) + expect(serializeInner(target)).toBe(``) expect(dir.mounted).toHaveBeenCalledTimes(1) expect(dir.unmounted).toHaveBeenCalledTimes(1) }) @@ -610,33 +584,29 @@ describe('renderer: teleport', () => { render(h(App), root) disabled.value = false await nextTick() - expect(serializeInner(target1)).toMatchInlineSnapshot( - `"
teleported
"`, - ) - expect(serializeInner(target2)).toMatchInlineSnapshot(`""`) - expect(serializeInner(target3)).toMatchInlineSnapshot(`""`) + expect(serializeInner(target1)).toBe(`
teleported
`) + expect(serializeInner(target2)).toBe(``) + expect(serializeInner(target3)).toBe(``) disabled.value = true await nextTick() target.value = target2 await nextTick() - expect(serializeInner(target1)).toMatchInlineSnapshot(`""`) - expect(serializeInner(target2)).toMatchInlineSnapshot(`""`) - expect(serializeInner(target3)).toMatchInlineSnapshot(`""`) + expect(serializeInner(target1)).toBe(``) + expect(serializeInner(target2)).toBe(``) + expect(serializeInner(target3)).toBe(``) target.value = target3 await nextTick() - expect(serializeInner(target1)).toMatchInlineSnapshot(`""`) - expect(serializeInner(target2)).toMatchInlineSnapshot(`""`) - expect(serializeInner(target3)).toMatchInlineSnapshot(`""`) + expect(serializeInner(target1)).toBe(``) + expect(serializeInner(target2)).toBe(``) + expect(serializeInner(target3)).toBe(``) disabled.value = false await nextTick() - expect(serializeInner(target1)).toMatchInlineSnapshot(`""`) - expect(serializeInner(target2)).toMatchInlineSnapshot(`""`) - expect(serializeInner(target3)).toMatchInlineSnapshot( - `"
teleported
"`, - ) + expect(serializeInner(target1)).toBe(``) + expect(serializeInner(target2)).toBe(``) + expect(serializeInner(target3)).toBe(`
teleported
`) }) //#9071 @@ -654,19 +624,19 @@ describe('renderer: teleport', () => { }) domRender(h(App), root) - expect(root.innerHTML).toMatchInlineSnapshot('"
foo
"') + expect(root.innerHTML).toBe('
foo
') show.value = true await nextTick() - expect(root.innerHTML).toMatchInlineSnapshot( - '"
teleported
"', + expect(root.innerHTML).toBe( + '
teleported
', ) show.value = false await nextTick() - expect(root.innerHTML).toMatchInlineSnapshot('"
foo
"') + expect(root.innerHTML).toBe('
foo
') }) test('unmount previous sibling node inside target node', async () => { @@ -693,17 +663,17 @@ describe('renderer: teleport', () => { }) domRender(h(App), root) - expect(root.innerHTML).toMatchInlineSnapshot('""') + expect(root.innerHTML).toBe('') parentShow.value = true await nextTick() - expect(root.innerHTML).toMatchInlineSnapshot( - '"
foo
"', + expect(root.innerHTML).toBe( + '
foo
', ) parentShow.value = false await nextTick() - expect(root.innerHTML).toMatchInlineSnapshot('""') + expect(root.innerHTML).toBe('') }) test('accessing template refs inside teleport', async () => { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index feaa76f50c3..a0a522e0fb0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -69,8 +69,8 @@ importers: specifier: ^6.1.4 version: 6.1.4 '@vitest/coverage-v8': - specifier: ^2.0.5 - version: 2.0.5(vitest@2.0.5(@types/node@20.16.5)(jsdom@25.0.0)(sass@1.78.0)) + specifier: ^2.1.1 + version: 2.1.1(vitest@2.1.1(@types/node@20.16.5)(jsdom@25.0.0)(sass@1.78.0)) '@vue/consolidate': specifier: 1.0.0 version: 1.0.0 @@ -94,7 +94,7 @@ importers: version: 4.2.1(eslint@9.10.0)(typescript@5.6.2) eslint-plugin-vitest: specifier: ^0.5.4 - version: 0.5.4(eslint@9.10.0)(typescript@5.6.2)(vitest@2.0.5(@types/node@20.16.5)(jsdom@25.0.0)(sass@1.78.0)) + version: 0.5.4(eslint@9.10.0)(typescript@5.6.2)(vitest@2.1.1(@types/node@20.16.5)(jsdom@25.0.0)(sass@1.78.0)) estree-walker: specifier: 'catalog:' version: 2.0.2 @@ -177,8 +177,8 @@ importers: specifier: 'catalog:' version: 5.4.0(@types/node@20.16.5)(sass@1.78.0) vitest: - specifier: ^2.0.5 - version: 2.0.5(@types/node@20.16.5)(jsdom@25.0.0)(sass@1.78.0) + specifier: ^2.1.1 + version: 2.1.1(@types/node@20.16.5)(jsdom@25.0.0)(sass@1.78.0) packages-private/dts-built-test: dependencies: @@ -965,91 +965,109 @@ packages: resolution: {integrity: sha512-jMYvxZwGmoHFBTbr12Xc6wOdc2xA5tF5F2q6t7Rcfab68TT0n+r7dgawD4qhPEvasDsVpQi+MgDzj2faOLsZjA==} cpu: [arm] os: [linux] + libc: [glibc] '@rollup/rollup-linux-arm-gnueabihf@4.21.3': resolution: {integrity: sha512-btVgIsCjuYFKUjopPoWiDqmoUXQDiW2A4C3Mtmp5vACm7/GnyuprqIDPNczeyR5W8rTXEbkmrJux7cJmD99D2g==} cpu: [arm] os: [linux] + libc: [glibc] '@rollup/rollup-linux-arm-musleabihf@4.20.0': resolution: {integrity: sha512-1asSTl4HKuIHIB1GcdFHNNZhxAYEdqML/MW4QmPS4G0ivbEcBr1JKlFLKsIRqjSwOBkdItn3/ZDlyvZ/N6KPlw==} cpu: [arm] os: [linux] + libc: [musl] '@rollup/rollup-linux-arm-musleabihf@4.21.3': resolution: {integrity: sha512-zmjbSphplZlau6ZTkxd3+NMtE4UKVy7U4aVFMmHcgO5CUbw17ZP6QCgyxhzGaU/wFFdTfiojjbLG3/0p9HhAqA==} cpu: [arm] os: [linux] + libc: [musl] '@rollup/rollup-linux-arm64-gnu@4.20.0': resolution: {integrity: sha512-COBb8Bkx56KldOYJfMf6wKeYJrtJ9vEgBRAOkfw6Ens0tnmzPqvlpjZiLgkhg6cA3DGzCmLmmd319pmHvKWWlQ==} cpu: [arm64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-arm64-gnu@4.21.3': resolution: {integrity: sha512-nSZfcZtAnQPRZmUkUQwZq2OjQciR6tEoJaZVFvLHsj0MF6QhNMg0fQ6mUOsiCUpTqxTx0/O6gX0V/nYc7LrgPw==} cpu: [arm64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-arm64-musl@4.20.0': resolution: {integrity: sha512-+it+mBSyMslVQa8wSPvBx53fYuZK/oLTu5RJoXogjk6x7Q7sz1GNRsXWjn6SwyJm8E/oMjNVwPhmNdIjwP135Q==} cpu: [arm64] os: [linux] + libc: [musl] '@rollup/rollup-linux-arm64-musl@4.21.3': resolution: {integrity: sha512-MnvSPGO8KJXIMGlQDYfvYS3IosFN2rKsvxRpPO2l2cum+Z3exiExLwVU+GExL96pn8IP+GdH8Tz70EpBhO0sIQ==} cpu: [arm64] os: [linux] + libc: [musl] '@rollup/rollup-linux-powerpc64le-gnu@4.20.0': resolution: {integrity: sha512-yAMvqhPfGKsAxHN8I4+jE0CpLWD8cv4z7CK7BMmhjDuz606Q2tFKkWRY8bHR9JQXYcoLfopo5TTqzxgPUjUMfw==} cpu: [ppc64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-powerpc64le-gnu@4.21.3': resolution: {integrity: sha512-+W+p/9QNDr2vE2AXU0qIy0qQE75E8RTwTwgqS2G5CRQ11vzq0tbnfBd6brWhS9bCRjAjepJe2fvvkvS3dno+iw==} cpu: [ppc64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-riscv64-gnu@4.20.0': resolution: {integrity: sha512-qmuxFpfmi/2SUkAw95TtNq/w/I7Gpjurx609OOOV7U4vhvUhBcftcmXwl3rqAek+ADBwSjIC4IVNLiszoj3dPA==} cpu: [riscv64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-riscv64-gnu@4.21.3': resolution: {integrity: sha512-yXH6K6KfqGXaxHrtr+Uoy+JpNlUlI46BKVyonGiaD74ravdnF9BUNC+vV+SIuB96hUMGShhKV693rF9QDfO6nQ==} cpu: [riscv64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-s390x-gnu@4.20.0': resolution: {integrity: sha512-I0BtGXddHSHjV1mqTNkgUZLnS3WtsqebAXv11D5BZE/gfw5KoyXSAXVqyJximQXNvNzUo4GKlCK/dIwXlz+jlg==} cpu: [s390x] os: [linux] + libc: [glibc] '@rollup/rollup-linux-s390x-gnu@4.21.3': resolution: {integrity: sha512-R8cwY9wcnApN/KDYWTH4gV/ypvy9yZUHlbJvfaiXSB48JO3KpwSpjOGqO4jnGkLDSk1hgjYkTbTt6Q7uvPf8eg==} cpu: [s390x] os: [linux] + libc: [glibc] '@rollup/rollup-linux-x64-gnu@4.20.0': resolution: {integrity: sha512-y+eoL2I3iphUg9tN9GB6ku1FA8kOfmF4oUEWhztDJ4KXJy1agk/9+pejOuZkNFhRwHAOxMsBPLbXPd6mJiCwew==} cpu: [x64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-x64-gnu@4.21.3': resolution: {integrity: sha512-kZPbX/NOPh0vhS5sI+dR8L1bU2cSO9FgxwM8r7wHzGydzfSjLRCFAT87GR5U9scj2rhzN3JPYVC7NoBbl4FZ0g==} cpu: [x64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-x64-musl@4.20.0': resolution: {integrity: sha512-hM3nhW40kBNYUkZb/r9k2FKK+/MnKglX7UYd4ZUy5DJs8/sMsIbqWK2piZtVGE3kcXVNj3B2IrUYROJMMCikNg==} cpu: [x64] os: [linux] + libc: [musl] '@rollup/rollup-linux-x64-musl@4.21.3': resolution: {integrity: sha512-S0Yq+xA1VEH66uiMNhijsWAafffydd2X5b77eLHfRmfLsRSpbiAWiRHV6DEpz6aOToPsgid7TI9rGd6zB1rhbg==} cpu: [x64] os: [linux] + libc: [musl] '@rollup/rollup-win32-arm64-msvc@4.20.0': resolution: {integrity: sha512-psegMvP+Ik/Bg7QRJbv8w8PAytPA7Uo8fpFjXyCRHWm6Nt42L+JtoqH8eDQ5hRP7/XW2UiIriy1Z46jf0Oa1kA==} @@ -1104,24 +1122,28 @@ packages: engines: {node: '>=10'} cpu: [arm64] os: [linux] + libc: [glibc] '@swc/core-linux-arm64-musl@1.7.26': resolution: {integrity: sha512-3w8iZICMkQQON0uIcvz7+Q1MPOW6hJ4O5ETjA0LSP/tuKqx30hIniCGOgPDnv3UTMruLUnQbtBwVCZTBKR3Rkg==} engines: {node: '>=10'} cpu: [arm64] os: [linux] + libc: [musl] '@swc/core-linux-x64-gnu@1.7.26': resolution: {integrity: sha512-c+pp9Zkk2lqb06bNGkR2Looxrs7FtGDMA4/aHjZcCqATgp348hOKH5WPvNLBl+yPrISuWjbKDVn3NgAvfvpH4w==} engines: {node: '>=10'} cpu: [x64] os: [linux] + libc: [glibc] '@swc/core-linux-x64-musl@1.7.26': resolution: {integrity: sha512-PgtyfHBF6xG87dUSSdTJHwZ3/8vWZfNIXQV2GlwEpslrOkGqy+WaiiyE7Of7z9AvDILfBBBcJvJ/r8u980wAfQ==} engines: {node: '>=10'} cpu: [x64] os: [linux] + libc: [musl] '@swc/core-win32-arm64-msvc@1.7.26': resolution: {integrity: sha512-9TNXPIJqFynlAOrRD6tUQjMq7KApSklK3R/tXgIxc7Qx+lWu8hlDQ/kVPLpU7PWvMMwC/3hKBW+p5f+Tms1hmA==} @@ -1277,28 +1299,44 @@ packages: vite: ^5.0.0 vue: ^3.2.25 - '@vitest/coverage-v8@2.0.5': - resolution: {integrity: sha512-qeFcySCg5FLO2bHHSa0tAZAOnAUbp4L6/A5JDuj9+bt53JREl8hpLjLHEWF0e/gWc8INVpJaqA7+Ene2rclpZg==} + '@vitest/coverage-v8@2.1.1': + resolution: {integrity: sha512-md/A7A3c42oTT8JUHSqjP5uKTWJejzUW4jalpvs+rZ27gsURsMU8DEb+8Jf8C6Kj2gwfSHJqobDNBuoqlm0cFw==} peerDependencies: - vitest: 2.0.5 + '@vitest/browser': 2.1.1 + vitest: 2.1.1 + peerDependenciesMeta: + '@vitest/browser': + optional: true - '@vitest/expect@2.0.5': - resolution: {integrity: sha512-yHZtwuP7JZivj65Gxoi8upUN2OzHTi3zVfjwdpu2WrvCZPLwsJ2Ey5ILIPccoW23dd/zQBlJ4/dhi7DWNyXCpA==} + '@vitest/expect@2.1.1': + resolution: {integrity: sha512-YeueunS0HiHiQxk+KEOnq/QMzlUuOzbU1Go+PgAsHvvv3tUkJPm9xWt+6ITNTlzsMXUjmgm5T+U7KBPK2qQV6w==} - '@vitest/pretty-format@2.0.5': - resolution: {integrity: sha512-h8k+1oWHfwTkyTkb9egzwNMfJAEx4veaPSnMeKbVSjp4euqGSbQlm5+6VHwTr7u4FJslVVsUG5nopCaAYdOmSQ==} + '@vitest/mocker@2.1.1': + resolution: {integrity: sha512-LNN5VwOEdJqCmJ/2XJBywB11DLlkbY0ooDJW3uRX5cZyYCrc4PI/ePX0iQhE3BiEGiQmK4GE7Q/PqCkkaiPnrA==} + peerDependencies: + '@vitest/spy': 2.1.1 + msw: ^2.3.5 + vite: ^5.0.0 + peerDependenciesMeta: + msw: + optional: true + vite: + optional: true + + '@vitest/pretty-format@2.1.1': + resolution: {integrity: sha512-SjxPFOtuINDUW8/UkElJYQSFtnWX7tMksSGW0vfjxMneFqxVr8YJ979QpMbDW7g+BIiq88RAGDjf7en6rvLPPQ==} - '@vitest/runner@2.0.5': - resolution: {integrity: sha512-TfRfZa6Bkk9ky4tW0z20WKXFEwwvWhRY+84CnSEtq4+3ZvDlJyY32oNTJtM7AW9ihW90tX/1Q78cb6FjoAs+ig==} + '@vitest/runner@2.1.1': + resolution: {integrity: sha512-uTPuY6PWOYitIkLPidaY5L3t0JJITdGTSwBtwMjKzo5O6RCOEncz9PUN+0pDidX8kTHYjO0EwUIvhlGpnGpxmA==} - '@vitest/snapshot@2.0.5': - resolution: {integrity: sha512-SgCPUeDFLaM0mIUHfaArq8fD2WbaXG/zVXjRupthYfYGzc8ztbFbu6dUNOblBG7XLMR1kEhS/DNnfCZ2IhdDew==} + '@vitest/snapshot@2.1.1': + resolution: {integrity: sha512-BnSku1WFy7r4mm96ha2FzN99AZJgpZOWrAhtQfoxjUU5YMRpq1zmHRq7a5K9/NjqonebO7iVDla+VvZS8BOWMw==} - '@vitest/spy@2.0.5': - resolution: {integrity: sha512-c/jdthAhvJdpfVuaexSrnawxZz6pywlTPe84LUB2m/4t3rl2fTo9NFGBG4oWgaD+FTgDDV8hJ/nibT7IfH3JfA==} + '@vitest/spy@2.1.1': + resolution: {integrity: sha512-ZM39BnZ9t/xZ/nF4UwRH5il0Sw93QnZXd9NAZGRpIgj0yvVwPpLd702s/Cx955rGaMlyBQkZJ2Ir7qyY48VZ+g==} - '@vitest/utils@2.0.5': - resolution: {integrity: sha512-d8HKbqIcya+GR67mkZbrzhS5kKhtp8dQLcmRZLGTscGVg7yImT82cIrhtn2L8+VujWcy6KZweApgNmPsTAO/UQ==} + '@vitest/utils@2.1.1': + resolution: {integrity: sha512-Y6Q9TsI+qJ2CC0ZKj6VBb+T8UPz593N113nnUykqwANqhgf3QkZeHFlusgKLTqrnVHbj/XDKZcDHol+dxVT+rQ==} '@vue/consolidate@1.0.0': resolution: {integrity: sha512-oTyUE+QHIzLw2PpV14GD/c7EohDyP64xCniWTcqcEmTd699eFqTIwOmtDYjcO1j3QgdXoJEoWv1/cCdLrRoOfg==} @@ -3181,6 +3219,9 @@ packages: tinybench@2.9.0: resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} + tinyexec@0.3.0: + resolution: {integrity: sha512-tVGE0mVJPGb0chKhqmsoosjsS+qUnJVGJpZgsHYQcGoPlG3B51R3PouqTgEGH2Dc9jjFyOqOpix6ZHNMXp1FZg==} + tinypool@1.0.0: resolution: {integrity: sha512-KIKExllK7jp3uvrNtvRBYBWBOAXSX8ZvoaD8T+7KB/QHIuoJW3Pmr60zucywjAlMb5TeXUkcs/MWeWLu0qvuAQ==} engines: {node: ^18.0.0 || >=20.0.0} @@ -3304,8 +3345,8 @@ packages: resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} engines: {node: '>= 0.8'} - vite-node@2.0.5: - resolution: {integrity: sha512-LdsW4pxj0Ot69FAoXZ1yTnA9bjGohr2yNBU7QKRxpz8ITSkhuDl6h3zS/tvgz4qrNjeRnvrWeXQ8ZF7Um4W00Q==} + vite-node@2.1.1: + resolution: {integrity: sha512-N/mGckI1suG/5wQI35XeR9rsMsPqKXzq1CdUndzVstBj/HvyxxGctwnK6WX43NGt5L3Z5tcRf83g4TITKJhPrA==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true @@ -3340,15 +3381,15 @@ packages: terser: optional: true - vitest@2.0.5: - resolution: {integrity: sha512-8GUxONfauuIdeSl5f9GTgVEpg5BTOlplET4WEDaeY2QBiN8wSm68vxN/tb5z405OwppfoCavnwXafiaYBC/xOA==} + vitest@2.1.1: + resolution: {integrity: sha512-97We7/VC0e9X5zBVkvt7SGQMGrRtn3KtySFQG5fpaMlS+l62eeXRQO633AYhSTC3z7IMebnPPNjGXVGNRFlxBA==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' '@types/node': ^18.0.0 || >=20.0.0 - '@vitest/browser': 2.0.5 - '@vitest/ui': 2.0.5 + '@vitest/browser': 2.1.1 + '@vitest/ui': 2.1.1 happy-dom: '*' jsdom: '*' peerDependenciesMeta: @@ -4116,7 +4157,7 @@ snapshots: vite: 5.4.0(@types/node@20.16.5)(sass@1.78.0) vue: link:packages/vue - '@vitest/coverage-v8@2.0.5(vitest@2.0.5(@types/node@20.16.5)(jsdom@25.0.0)(sass@1.78.0))': + '@vitest/coverage-v8@2.1.1(vitest@2.1.1(@types/node@20.16.5)(jsdom@25.0.0)(sass@1.78.0))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -4130,40 +4171,47 @@ snapshots: std-env: 3.7.0 test-exclude: 7.0.1 tinyrainbow: 1.2.0 - vitest: 2.0.5(@types/node@20.16.5)(jsdom@25.0.0)(sass@1.78.0) + vitest: 2.1.1(@types/node@20.16.5)(jsdom@25.0.0)(sass@1.78.0) transitivePeerDependencies: - supports-color - '@vitest/expect@2.0.5': + '@vitest/expect@2.1.1': dependencies: - '@vitest/spy': 2.0.5 - '@vitest/utils': 2.0.5 + '@vitest/spy': 2.1.1 + '@vitest/utils': 2.1.1 chai: 5.1.1 tinyrainbow: 1.2.0 - '@vitest/pretty-format@2.0.5': + '@vitest/mocker@2.1.1(@vitest/spy@2.1.1)(vite@5.4.0(@types/node@20.16.5)(sass@1.78.0))': + dependencies: + '@vitest/spy': 2.1.1 + estree-walker: 3.0.3 + magic-string: 0.30.11 + optionalDependencies: + vite: 5.4.0(@types/node@20.16.5)(sass@1.78.0) + + '@vitest/pretty-format@2.1.1': dependencies: tinyrainbow: 1.2.0 - '@vitest/runner@2.0.5': + '@vitest/runner@2.1.1': dependencies: - '@vitest/utils': 2.0.5 + '@vitest/utils': 2.1.1 pathe: 1.1.2 - '@vitest/snapshot@2.0.5': + '@vitest/snapshot@2.1.1': dependencies: - '@vitest/pretty-format': 2.0.5 + '@vitest/pretty-format': 2.1.1 magic-string: 0.30.11 pathe: 1.1.2 - '@vitest/spy@2.0.5': + '@vitest/spy@2.1.1': dependencies: tinyspy: 3.0.0 - '@vitest/utils@2.0.5': + '@vitest/utils@2.1.1': dependencies: - '@vitest/pretty-format': 2.0.5 - estree-walker: 3.0.3 + '@vitest/pretty-format': 2.1.1 loupe: 3.1.1 tinyrainbow: 1.2.0 @@ -4769,12 +4817,12 @@ snapshots: - supports-color - typescript - eslint-plugin-vitest@0.5.4(eslint@9.10.0)(typescript@5.6.2)(vitest@2.0.5(@types/node@20.16.5)(jsdom@25.0.0)(sass@1.78.0)): + eslint-plugin-vitest@0.5.4(eslint@9.10.0)(typescript@5.6.2)(vitest@2.1.1(@types/node@20.16.5)(jsdom@25.0.0)(sass@1.78.0)): dependencies: '@typescript-eslint/utils': 7.18.0(eslint@9.10.0)(typescript@5.6.2) eslint: 9.10.0 optionalDependencies: - vitest: 2.0.5(@types/node@20.16.5)(jsdom@25.0.0)(sass@1.78.0) + vitest: 2.1.1(@types/node@20.16.5)(jsdom@25.0.0)(sass@1.78.0) transitivePeerDependencies: - supports-color - typescript @@ -5410,7 +5458,7 @@ snapshots: dependencies: '@babel/parser': 7.25.3 '@babel/types': 7.25.2 - source-map-js: 1.2.0 + source-map-js: 1.2.1 make-dir@4.0.0: dependencies: @@ -6217,6 +6265,8 @@ snapshots: tinybench@2.9.0: {} + tinyexec@0.3.0: {} + tinypool@1.0.0: {} tinyrainbow@1.2.0: {} @@ -6316,12 +6366,11 @@ snapshots: vary@1.1.2: {} - vite-node@2.0.5(@types/node@20.16.5)(sass@1.78.0): + vite-node@2.1.1(@types/node@20.16.5)(sass@1.78.0): dependencies: cac: 6.7.14 debug: 4.3.6 pathe: 1.1.2 - tinyrainbow: 1.2.0 vite: 5.4.0(@types/node@20.16.5)(sass@1.78.0) transitivePeerDependencies: - '@types/node' @@ -6344,26 +6393,26 @@ snapshots: fsevents: 2.3.3 sass: 1.78.0 - vitest@2.0.5(@types/node@20.16.5)(jsdom@25.0.0)(sass@1.78.0): + vitest@2.1.1(@types/node@20.16.5)(jsdom@25.0.0)(sass@1.78.0): dependencies: - '@ampproject/remapping': 2.3.0 - '@vitest/expect': 2.0.5 - '@vitest/pretty-format': 2.0.5 - '@vitest/runner': 2.0.5 - '@vitest/snapshot': 2.0.5 - '@vitest/spy': 2.0.5 - '@vitest/utils': 2.0.5 + '@vitest/expect': 2.1.1 + '@vitest/mocker': 2.1.1(@vitest/spy@2.1.1)(vite@5.4.0(@types/node@20.16.5)(sass@1.78.0)) + '@vitest/pretty-format': 2.1.1 + '@vitest/runner': 2.1.1 + '@vitest/snapshot': 2.1.1 + '@vitest/spy': 2.1.1 + '@vitest/utils': 2.1.1 chai: 5.1.1 debug: 4.3.6 - execa: 8.0.1 magic-string: 0.30.11 pathe: 1.1.2 std-env: 3.7.0 tinybench: 2.9.0 + tinyexec: 0.3.0 tinypool: 1.0.0 tinyrainbow: 1.2.0 vite: 5.4.0(@types/node@20.16.5)(sass@1.78.0) - vite-node: 2.0.5(@types/node@20.16.5)(sass@1.78.0) + vite-node: 2.1.1(@types/node@20.16.5)(sass@1.78.0) why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 20.16.5 @@ -6371,6 +6420,7 @@ snapshots: transitivePeerDependencies: - less - lightningcss + - msw - sass - sass-embedded - stylus diff --git a/vitest.e2e.config.ts b/vitest.e2e.config.ts index 90a67d229d8..622bda0bd57 100644 --- a/vitest.e2e.config.ts +++ b/vitest.e2e.config.ts @@ -3,6 +3,7 @@ import config from './vitest.config' export default mergeConfig(config, { test: { + name: 'e2e', poolOptions: { threads: { singleThread: !!process.env.CI, diff --git a/vitest.unit.config.ts b/vitest.unit.config.ts index 80549766c50..0082997e0d1 100644 --- a/vitest.unit.config.ts +++ b/vitest.unit.config.ts @@ -3,6 +3,7 @@ import config from './vitest.config' export default mergeConfig(config, { test: { + name: 'unit', exclude: [...configDefaults.exclude, '**/e2e/**'], }, })