Files
goodgo-platform/apps/api/vitest.config.ts
Ho Ngoc Hai d4652fd0f9 fix(auth): use env-configurable bcrypt rounds to prevent test timeout
HashedPassword.vo.spec.ts was timing out because SALT_ROUNDS=12 is too
expensive for the test runner. Make bcrypt rounds configurable via
BCRYPT_ROUNDS env var (default 12 for production), and set BCRYPT_ROUNDS=4
in vitest config for fast unit tests.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-10 23:26:43 +07:00

20 lines
403 B
TypeScript

import path from 'path';
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
globals: true,
environment: 'node',
include: ['src/**/*.spec.ts'],
exclude: ['src/**/*.integration.spec.ts', 'node_modules'],
env: {
BCRYPT_ROUNDS: '4',
},
},
resolve: {
alias: {
'@modules': path.resolve(__dirname, 'src/modules'),
},
},
});