runtipi/vitest.workspace.ts

19 lines
502 B
TypeScript
Raw Normal View History

2023-10-11 06:36:43 +00:00
import { defineWorkspace, UserWorkspaceConfig } from 'vitest/config';
import tsconfigPaths from 'vite-tsconfig-paths';
2023-10-11 06:36:43 +00:00
type Plugin = Exclude<UserWorkspaceConfig['plugins'], undefined>[number];
export default defineWorkspace([
{
2023-10-11 06:36:43 +00:00
plugins: [tsconfigPaths() as Plugin],
test: {
globals: true,
name: 'server',
root: './src/server',
environment: 'node',
include: ['./services/auth/auth.service.test.ts'],
setupFiles: ['./tests/vite.setup.ts'],
},
},
]);