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>
20 lines
403 B
TypeScript
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'),
|
|
},
|
|
},
|
|
});
|