test: add Vitest API tests for tasks routes

- Tests for GET, POST, PATCH, DELETE task routes
- Tests for dependency cycle detection
- Jest config with SWC transform and module aliases
This commit is contained in:
2026-07-29 06:14:44 -04:00
parent b6e2ab415e
commit d7762143bb
2 changed files with 257 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
/** @type {import('jest').Config} */
const config = {
testEnvironment: 'node',
transform: {
'^.+\\.(t|j)sx?$': ['@swc/jest'],
},
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/$1',
'^@project-e/db$': '<rootDir>/../../packages/db/src',
'^@project-e/shared$': '<rootDir>/../../packages/shared/src',
},
testMatch: ['**/__tests__/**/*.test.(ts|tsx|js)'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
};
module.exports = config;