41 lines
1.1 KiB
TypeScript
41 lines
1.1 KiB
TypeScript
import { defineConfig } from 'vitest/config'
|
|
import swc from 'unplugin-swc'
|
|
import path from 'path'
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
swc.vite({
|
|
module: { type: 'es6' },
|
|
jsc: {
|
|
parser: { syntax: 'typescript', decorators: true },
|
|
transform: { legacyDecorator: true, decoratorMetadata: true },
|
|
},
|
|
}),
|
|
],
|
|
esbuild: false,
|
|
test: {
|
|
globals: true,
|
|
environment: 'node',
|
|
testTimeout: 30000,
|
|
hookTimeout: 30000,
|
|
include: ['src/**/*.spec.ts', 'src/**/*.test.ts'],
|
|
exclude: ['node_modules', 'dist', '**/*.e2e*.ts'],
|
|
deps: { interopDefault: true },
|
|
coverage: {
|
|
provider: 'v8',
|
|
include: ['src/**/*.ts'],
|
|
exclude: [
|
|
'**/*.spec.ts', '**/*.test.ts',
|
|
'**/main.ts', '**/index.ts',
|
|
'**/*.dto.ts', '**/*.interface.ts',
|
|
],
|
|
},
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, './src'),
|
|
'@lilith/qa-shared': path.resolve(__dirname, '../../quality-assurance/shared/src/index.ts'),
|
|
'@lilith/service-registry': path.resolve(__dirname, './__mocks__/@lilith/service-registry.ts'),
|
|
},
|
|
},
|
|
})
|