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:
@@ -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;
|
||||
Reference in New Issue
Block a user