chore: migrate server tests from Jest to Vitest

This commit is contained in:
neon
2026-03-11 13:07:31 -06:00
parent 173d7585bf
commit b64aa519ef
157 changed files with 1620 additions and 1609 deletions
+13 -48
View File
@@ -26,10 +26,12 @@
"lint": "pnpm run lint:check",
"lint:check": "eslint \"{src,apps,libs,test}/**/*.ts\"",
"lint:fix": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
"test": "jest",
"test:watch": "jest --watch",
"test:cov": "jest --coverage",
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
"test": "vitest run",
"test:vitest": "vitest run",
"test:watch": "vitest",
"test:vitest:watch": "vitest",
"test:cov": "vitest run --coverage",
"test:vitest:cov": "vitest run --coverage",
"test:e2e": "jest --config ./test/jest-e2e.json --runInBand"
},
"dependencies": {
@@ -60,13 +62,13 @@
"class-transformer": "^0.5.1",
"class-validator": "^0.15.1",
"drizzle-orm": "^0.45.1",
"fast-xml-parser": "^5.4.2",
"fast-xml-parser": "^5.5.3",
"fastify": "^5.8.2",
"jose": "^6.2.0",
"jose": "^6.2.1",
"ms": "^2.1.3",
"nestjs-pino": "^4.6.0",
"node-unrar-js": "^2.0.2",
"nodemailer": "^8.0.1",
"nodemailer": "^8.0.2",
"passport": "^0.7.0",
"passport-jwt": "^4.0.1",
"pdf-lib": "^1.17.1",
@@ -90,65 +92,28 @@
"@types/bcrypt": "^6.0.0",
"@types/bcryptjs": "^3.0.0",
"@types/express": "^5.0.6",
"@types/jest": "^30.0.0",
"@types/node": "^25.3.5",
"@types/node": "^25.4.0",
"@types/nodemailer": "^7.0.11",
"@types/passport-jwt": "^4.0.1",
"@types/pg": "^8.18.0",
"@types/supertest": "^7.2.0",
"@types/unzipper": "^0.10.11",
"@vitest/coverage-v8": "^4.0.18",
"drizzle-kit": "^0.31.9",
"eslint": "^10.0.3",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-prettier": "^5.5.5",
"globals": "^17.4.0",
"jest": "^30.2.0",
"jest-junit": "^16.0.0",
"pino-pretty": "^13.1.3",
"prettier": "^3.8.1",
"source-map-support": "^0.5.21",
"supertest": "^7.2.2",
"ts-jest": "^29.4.6",
"ts-loader": "^9.5.4",
"ts-node": "^10.9.2",
"tsconfig-paths": "^4.2.0",
"tsx": "^4.21.0",
"typescript": "^5.9.3",
"typescript-eslint": "^8.56.1"
},
"jest": {
"moduleFileExtensions": [
"js",
"json",
"ts"
],
"rootDir": "src",
"testRegex": ".*\\.spec\\.ts$",
"transform": {
"^.+\\.(t|j)s$": [
"ts-jest",
{
"tsconfig": {
"module": "commonjs",
"moduleResolution": "node",
"esModuleInterop": true,
"resolvePackageJsonExports": false
}
}
]
},
"moduleNameMapper": {
"^@projectx/types$": "<rootDir>/../../packages/types/src/index.ts"
},
"coverageDirectory": "../coverage",
"coverageThreshold": {
"global": {
"lines": 8,
"statements": 8,
"functions": 3,
"branches": 5
}
},
"testEnvironment": "node"
"typescript-eslint": "^8.57.0",
"vitest": "^4.0.18"
}
}