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

chore(test): remove deprecated environmentMatchGlobs #12759

Closed
wants to merge 2 commits into from
Closed
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
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
"format": "prettier --write --cache .",
"format-check": "prettier --check --cache .",
"test": "vitest",
"test-unit": "vitest --project unit",
"test-e2e": "node scripts/build.js vue -f global -d && vitest --project e2e",
"test-unit": "vitest --project=unit-node --project=unit-dom",
"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 --project unit --coverage",
"test-coverage": "vitest run --project=unit-node --project=unit-dom --coverage",
"prebench": "node scripts/build.js -pf esm-browser reactivity",
"prebench-compare": "node scripts/build.js -pf esm-browser reactivity",
"bench": "vitest bench --project=unit --outputJson=temp/bench.json",
"bench-compare": "vitest bench --project=unit --compare=temp/bench.json",
"bench": "vitest bench --project=unit-node --project=unit-dom --outputJson=temp/bench.json",
"bench-compare": "vitest bench --project=unit-node --project=unit-dom --compare=temp/bench.json",
"release": "node scripts/release.js",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
"dev-esm": "node scripts/dev.js -if esm-bundler-runtime",
Expand Down
3 changes: 0 additions & 3 deletions vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ export default defineConfig({
globals: true,
pool: 'threads',
setupFiles: 'scripts/setup-vitest.ts',
environmentMatchGlobs: [
['packages/{vue,vue-compat,runtime-dom}/**', 'jsdom'],
],
sequence: {
hooks: 'list',
},
Expand Down
1 change: 1 addition & 0 deletions vitest.e2e.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ export default mergeConfig(config, {
},
},
include: ['packages/vue/__tests__/e2e/*.spec.ts'],
environment: 'jsdom',
},
})
4 changes: 3 additions & 1 deletion vitest.unit.config.ts → vitest.unit-dom.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import config from './vitest.config'

export default mergeConfig(config, {
test: {
name: 'unit',
name: 'unit-dom',
include: ['packages/{vue,vue-compat,runtime-dom}/**/*.spec.ts'],
exclude: [...configDefaults.exclude, '**/e2e/**'],
environment: 'jsdom',
},
})
13 changes: 13 additions & 0 deletions vitest.unit-node.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { configDefaults, mergeConfig } from 'vitest/config'
import config from './vitest.config'

export default mergeConfig(config, {
test: {
name: 'unit-node',
exclude: [
...configDefaults.exclude,
'**/e2e/**',
'packages/{vue,vue-compat,runtime-dom}/**/*.spec.ts',
],
},
})
3 changes: 2 additions & 1 deletion vitest.workspace.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { defineWorkspace } from 'vitest/config'

export default defineWorkspace([
'./vitest.unit.config.ts',
'./vitest.unit-node.config.ts',
'./vitest.unit-dom.config.ts',
'./vitest.e2e.config.ts',
])
Loading