Skip to content

Commit 28b95da

Browse files
committed
workflow: complete migration from jest to vitest
1 parent 158db33 commit 28b95da

File tree

10 files changed

+177
-1946
lines changed

10 files changed

+177
-1946
lines changed

jest.config.js

Lines changed: 0 additions & 67 deletions
This file was deleted.

package.json

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
"lint": "eslint --cache --ext .ts packages/*/{src,__tests__}/**.ts",
1212
"format": "prettier --write --cache --parser typescript \"**/*.[tj]s?(x)\"",
1313
"format-check": "prettier --check --cache --parser typescript \"**/*.[tj]s?(x)\"",
14-
"test": "run-s \"test-unit {@}\" \"test-e2e {@}\"",
15-
"test-unit": "jest --filter ./scripts/filter-unit.mjs",
16-
"test-e2e": "node scripts/build.mjs vue -f global -d && jest --filter ./scripts/filter-e2e.js --runInBand",
14+
"test": "vitest",
15+
"test-unit": "vitest -c vitest.unit.config.ts",
16+
"test-e2e": "node scripts/build.mjs vue -f global -d && vitest -c vitest.e2e.config.ts",
1717
"test-dts": "node scripts/build.mjs shared reactivity runtime-core runtime-dom -dt -f esm-bundler && npm run test-dts-only",
1818
"test-dts-only": "tsc -p ./test-dts/tsconfig.json && tsc -p ./test-dts/tsconfig.build.mjson",
19-
"test-coverage": "node scripts/build.mjs vue -f global -d && jest --runInBand --coverage --bail",
19+
"test-coverage": "vitest -c vitest.unit.config.ts --coverage",
2020
"release": "node scripts/release.mjs",
2121
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
2222
"dev-esm": "node scripts/dev.mjs -if esm-bundler-runtime",
@@ -62,9 +62,9 @@
6262
"@rollup/plugin-replace": "^5.0.1",
6363
"@rollup/plugin-terser": "^0.1.0",
6464
"@types/hash-sum": "^1.0.0",
65-
"@types/jest": "^29.2.2",
6665
"@types/node": "^16.4.7",
6766
"@typescript-eslint/parser": "^5.23.0",
67+
"@vitest/coverage-istanbul": "^0.28.2",
6868
"@vue/consolidate": "0.17.3",
6969
"@vue/reactivity": "workspace:*",
7070
"@vue/runtime-core": "workspace:*",
@@ -76,10 +76,8 @@
7676
"enquirer": "^2.3.2",
7777
"esbuild": "^0.17.4",
7878
"eslint": "^7.7.0",
79-
"eslint-plugin-jest": "26.1.5",
79+
"eslint-plugin-jest": "^27.2.1",
8080
"execa": "^4.0.2",
81-
"jest": "^29.3.1",
82-
"jest-environment-jsdom": "^29.3.1",
8381
"lint-staged": "^10.2.10",
8482
"lodash": "^4.17.15",
8583
"marked": "^4.0.10",
@@ -98,7 +96,6 @@
9896
"simple-git-hooks": "^2.8.1",
9997
"terser": "^5.15.1",
10098
"todomvc-app-css": "^2.3.0",
101-
"ts-jest": "^29.0.3",
10299
"tslib": "^2.4.0",
103100
"typescript": "^4.8.0",
104101
"vite": "^4.0.4",

packages/vue/src/dev.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { initCustomFormatter } from '@vue/runtime-dom'
22

33
export function initDev() {
44
if (__BROWSER__) {
5+
/* istanbul ignore if */
56
if (!__ESM_BUNDLER__) {
67
console.info(
78
`You are running a development build of Vue.\n` +

0 commit comments

Comments
 (0)