Skip to content

Commit b532495

Browse files
43081jJoviDeCroock
authored andcommitted
test: add vitest prep (#707)
Adds vitest and associated scripts which will not succeed yet, as we have no projects.
1 parent 5aac56f commit b532495

4 files changed

Lines changed: 2491 additions & 1225 deletions

File tree

package.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"lint:oxlint": "oxlint 'packages/**/*.{ts,tsx,js,jsx}'",
2626
"lint:tsc": "tsc -p tsconfig.json --noEmit",
2727
"lint-staged": "lint-staged",
28-
"test": "pnpm test:karma && pnpm test:mocha",
28+
"test": "pnpm test:karma && pnpm test:mocha && pnpm test:vitest",
2929
"test:minify": "pnpm test:karma:minify && pnpm test:mocha",
3030
"test:prod": "pnpm test:karma:prod && pnpm test:mocha:prod",
3131
"test:karma": "cross-env COVERAGE=true karma start karma.conf.js --single-run",
@@ -35,12 +35,13 @@
3535
"test:karma:prod:watch": "cross-env NODE_ENV=production karma start karma.conf.js --no-single-run",
3636
"test:mocha": "cross-env COVERAGE=true mocha --require test/node/setup.js --recursive packages/*/test/node/**.test.tsx",
3737
"test:mocha:prod": "cross-env COVERAGE=true NODE_ENV=production mocha --require test/node/setup.js --recursive packages/*/test/node/**.test.tsx",
38+
"test:vitest": "cross-env COVERAGE=true vitest run",
3839
"docs:start": "cd docs && pnpm start",
3940
"docs:build": "cd docs && pnpm build",
4041
"docs:preview": "cd docs && pnpm preview",
4142
"ci:build": "pnpm build && pnpm docs:build",
4243
"ci:test": "pnpm lint && pnpm test",
43-
"prepare": "husky install",
44+
"prepare": "husky install && playwright install chromium",
4445
"format": "prettier --ignore-path .gitignore --write '**/*.{js,jsx,ts,tsx,yml,json,md}'",
4546
"version": "pnpm changeset version && pnpm i --lockfile-only"
4647
},
@@ -68,6 +69,7 @@
6869
"@types/node": "^18.19.103",
6970
"@types/sinon": "^10.0.13",
7071
"@types/sinon-chai": "^3.2.8",
72+
"@vitest/coverage-v8": "^3.2.4",
7173
"babel-plugin-istanbul": "^6.1.1",
7274
"babel-plugin-transform-rename-properties": "^0.1.0",
7375
"buffer": "^6.0.3",
@@ -89,11 +91,13 @@
8991
"microbundle": "^0.15.1",
9092
"mocha": "^10.0.0",
9193
"oxlint": "^1.3.0",
94+
"playwright": "^1.53.1",
9295
"prettier": "^3.6.2",
9396
"shx": "^0.3.4",
9497
"sinon": "^14.0.0",
9598
"sinon-chai": "^3.7.0",
96-
"typescript": "~5.8.3"
99+
"typescript": "~5.8.3",
100+
"vitest": "^3.2.4"
97101
},
98102
"lint-staged": {
99103
"**/*.{js,jsx,ts,tsx,yml,json,md}": [

0 commit comments

Comments
 (0)