Skip to content

Commit 83914ea

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 d3c27a6 commit 83914ea

File tree

4 files changed

+1213
-10
lines changed

4 files changed

+1213
-10
lines changed

package.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"lint:oxlint": "oxlint 'packages/**/*.{ts,tsx,js,jsx}'",
2323
"lint:tsc": "tsc -p tsconfig.json --noEmit",
2424
"lint-staged": "lint-staged",
25-
"test": "pnpm test:karma && pnpm test:mocha",
25+
"test": "pnpm test:karma && pnpm test:mocha && pnpm test:vitest",
2626
"test:minify": "pnpm test:karma:minify && pnpm test:mocha",
2727
"test:prod": "pnpm test:karma:prod && pnpm test:mocha:prod",
2828
"test:karma": "cross-env COVERAGE=true karma start karma.conf.js --single-run",
@@ -32,12 +32,13 @@
3232
"test:karma:prod:watch": "cross-env NODE_ENV=production karma start karma.conf.js --no-single-run",
3333
"test:mocha": "cross-env COVERAGE=true mocha --require test/node/setup.js --recursive packages/*/test/node/**.test.tsx",
3434
"test:mocha:prod": "cross-env COVERAGE=true NODE_ENV=production mocha --require test/node/setup.js --recursive packages/*/test/node/**.test.tsx",
35+
"test:vitest": "cross-env COVERAGE=true vitest run",
3536
"docs:start": "cd docs && pnpm start",
3637
"docs:build": "cd docs && pnpm build",
3738
"docs:preview": "cd docs && pnpm preview",
3839
"ci:build": "pnpm build && pnpm docs:build",
3940
"ci:test": "pnpm lint && pnpm test",
40-
"prepare": "husky install",
41+
"prepare": "husky install && playwright install chromium",
4142
"format": "prettier --ignore-path .gitignore --write '**/*.{js,jsx,ts,tsx,yml,json,md}'",
4243
"version": "pnpm changeset version && pnpm i --lockfile-only"
4344
},
@@ -65,6 +66,7 @@
6566
"@types/node": "^18.19.103",
6667
"@types/sinon": "^10.0.13",
6768
"@types/sinon-chai": "^3.2.8",
69+
"@vitest/coverage-v8": "^3.2.4",
6870
"babel-plugin-istanbul": "^6.1.1",
6971
"babel-plugin-transform-rename-properties": "^0.1.0",
7072
"buffer": "^6.0.3",
@@ -86,11 +88,13 @@
8688
"microbundle": "^0.15.1",
8789
"mocha": "^10.0.0",
8890
"oxlint": "^1.3.0",
91+
"playwright": "^1.53.1",
8992
"prettier": "^3.6.2",
9093
"shx": "^0.3.4",
9194
"sinon": "^14.0.0",
9295
"sinon-chai": "^3.7.0",
93-
"typescript": "~5.8.3"
96+
"typescript": "~5.8.3",
97+
"vitest": "^3.2.4"
9498
},
9599
"lint-staged": {
96100
"**/*.{js,jsx,ts,tsx,yml,json,md}": [

0 commit comments

Comments
 (0)