mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-26 04:39:53 +01:00
配 vitest:jsdom 环境与覆盖率
This commit is contained in:
parent
975bbe2cfd
commit
e58de03be2
3 changed files with 19 additions and 1 deletions
|
|
@ -7,7 +7,9 @@
|
||||||
"check:i18n": "node scripts/check-i18n.js",
|
"check:i18n": "node scripts/check-i18n.js",
|
||||||
"test:snapshot": "node --test src/components/agentSnapshotDisplayUtils.test.mjs src/apis/module/agentSnapshotApi.test.mjs",
|
"test:snapshot": "node --test src/components/agentSnapshotDisplayUtils.test.mjs src/apis/module/agentSnapshotApi.test.mjs",
|
||||||
"build": "vue-cli-service build",
|
"build": "vue-cli-service build",
|
||||||
"test:unit": "node --test tests/*.test.mjs",
|
"test:contract": "node --test tests/*Contract.test.mjs",
|
||||||
|
"test:unit": "vitest run",
|
||||||
|
"test": "npm run test:contract && npm run test:unit",
|
||||||
"analyze": "cross-env ANALYZE=true vue-cli-service build"
|
"analyze": "cross-env ANALYZE=true vue-cli-service build"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
||||||
16
main/manager-web/vitest.config.js
Normal file
16
main/manager-web/vitest.config.js
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
import { defineConfig } from 'vitest/config';
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
test: {
|
||||||
|
environment: 'jsdom',
|
||||||
|
globals: false,
|
||||||
|
include: ['tests/**/*.test.{js,mjs}'],
|
||||||
|
exclude: ['tests/*Contract.test.mjs', 'node_modules/**'],
|
||||||
|
passWithNoTests: true,
|
||||||
|
coverage: {
|
||||||
|
provider: 'v8',
|
||||||
|
reporter: ['text', 'html'],
|
||||||
|
include: ['src/utils/**', 'src/store/**'],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
Loading…
Reference in a new issue