Skip to content

Commit c810727

Browse files
authored
feat(test): use vue-utils-test & viest for unit test (webfansplz#370)
1 parent 5bffe68 commit c810727

File tree

9 files changed

+1462
-68
lines changed

9 files changed

+1462
-68
lines changed

package.json

+12-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"author": "",
1212
"main": "index.js",
1313
"scripts": {
14+
"test": "vitest --environment jsdom --ui",
1415
"build": "tsx ./scripts/build.ts",
1516
"docs:dev": "pnpm run -C docs update && pnpm run -C docs dev",
1617
"docs:build": "pnpm run -C docs build",
@@ -26,14 +27,24 @@
2627
"devDependencies": {
2728
"@types/fs-extra": "^9.0.13",
2829
"@types/js-yaml": "^4.0.5",
30+
"@types/jsdom": "^16.2.14",
2931
"@types/node": "^18.0.0",
32+
"@vitejs/plugin-vue": "^2.3.3",
33+
"@vitest/ui": "^0.17.0",
34+
"@vue/test-utils": "^2.0.2",
3035
"@webfansplz/eslint-config": "^0.1.0",
3136
"eslint": "^8.18.0",
3237
"fast-glob": "^3.2.11",
3338
"fs-extra": "^10.1.0",
3439
"js-yaml": "^4.1.0",
40+
"jsdom": "^20.0.0",
3541
"pnpm": "7.3.0",
3642
"tsx": "^3.6.0",
37-
"typescript": "^4.7.4"
43+
"typescript": "^4.7.4",
44+
"vitest": "^0.17.0",
45+
"vue": "^3.2.37"
46+
},
47+
"stackblitz": {
48+
"startCommand": "npm run test"
3849
}
3950
}

0 commit comments

Comments
 (0)