chore: vitest support (#4026)

* chore: vitest

* chore: move test files

* chore: support vitest

* fix: exclude test files

* chore(ci): add test workflow

* feat: remove read env
This commit is contained in:
Finley Ge
2025-03-12 19:27:53 +08:00
committed by GitHub
parent 139e934345
commit bb30ca4859
32 changed files with 2393 additions and 892 deletions

View File

@@ -6,8 +6,7 @@
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint",
"test": "jest"
"lint": "next lint"
},
"dependencies": {
"@chakra-ui/anatomy": "2.2.1",
@@ -26,7 +25,6 @@
"@fortaine/fetch-event-source": "^3.0.6",
"@node-rs/jieba": "1.10.0",
"@tanstack/react-query": "^4.24.10",
"@types/jest": "^29.5.2",
"@types/nprogress": "^0.2.0",
"ahooks": "^3.7.11",
"axios": "^1.8.2",
@@ -39,7 +37,6 @@
"hyperdown": "^2.4.29",
"i18next": "23.11.5",
"immer": "^9.0.19",
"jest": "^29.5.0",
"js-yaml": "^4.1.0",
"json5": "^2.2.3",
"jsondiffpatch": "^0.6.0",
@@ -69,13 +66,10 @@
"remark-math": "^6.0.0",
"request-ip": "^3.3.0",
"sass": "^1.58.3",
"ts-jest": "^29.1.0",
"use-context-selector": "^1.4.4",
"zustand": "^4.3.5"
},
"devDependencies": {
"@faker-js/faker": "^9.0.3",
"@shelf/jest-mongodb": "^4.3.2",
"@svgr/webpack": "^6.5.1",
"@types/formidable": "^2.0.5",
"@types/js-yaml": "^4.0.9",
@@ -89,8 +83,6 @@
"@types/request-ip": "^0.0.37",
"eslint": "8.56.0",
"eslint-config-next": "14.2.3",
"mockingoose": "^2.16.2",
"mongodb-memory-server": "^10.0.0",
"nextjs-node-loader": "^1.1.5",
"typescript": "^5.1.3"
}