38 lines
654 B
TypeScript
38 lines
654 B
TypeScript
import path from 'node:path';
|
|
import { defineConfig } from 'vitest/config';
|
|
|
|
const pathAliases = {
|
|
alias: {
|
|
'@': path.resolve(__dirname, './src'),
|
|
},
|
|
};
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
env: {
|
|
PINO_LOG_LEVEL: 'silent',
|
|
},
|
|
environment: 'node',
|
|
coverage: {
|
|
reporter: ['text', 'html', 'clover', 'json'],
|
|
},
|
|
projects: [
|
|
{
|
|
test: {
|
|
name: 'unit',
|
|
include: ['./test/**/*.unit.test.ts'],
|
|
},
|
|
resolve: pathAliases,
|
|
},
|
|
{
|
|
test: {
|
|
name: 'integration',
|
|
include: ['./test/**/*.integration.test.ts'],
|
|
globalSetup: './test/global-setup.ts',
|
|
},
|
|
resolve: pathAliases,
|
|
},
|
|
],
|
|
},
|
|
});
|