forked from event-catalog/eventcatalog
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.js
More file actions
42 lines (40 loc) · 1.75 KB
/
vitest.config.js
File metadata and controls
42 lines (40 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import { defineConfig } from 'vitest/config';
import tsconfigPaths from 'vite-tsconfig-paths';
import path from 'path';
import { fileURLToPath } from 'url';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
export default defineConfig({
root: __dirname,
plugins: [
tsconfigPaths({
projects: [path.resolve(__dirname, 'eventcatalog/tsconfig.json')],
}),
],
test: {
globals: true,
environment: 'node',
testTimeout: 5000,
env: {
PROJECT_DIR: path.resolve(__dirname, 'examples/default'),
},
},
resolve: {
conditions: ['import', 'module', 'node', 'default'],
alias: {
'astro:content': path.resolve(__dirname, './src/__mocks__/astro-content.ts'),
'@config': path.resolve(__dirname, 'eventcatalog/eventcatalog.config.js'),
'@eventcatalog/sdk': path.resolve(__dirname, 'node_modules/@eventcatalog/sdk/dist/index.mjs'),
'@eventcatalog': path.resolve(__dirname, 'eventcatalog/src/utils/eventcatalog-config/catalog.ts'),
'@icons': path.resolve(__dirname, 'eventcatalog/src/icons'),
'@components': path.resolve(__dirname, 'eventcatalog/src/components'),
'@catalog/components': path.resolve(__dirname, 'eventcatalog/src/custom-defined-components'),
'@catalog/snippets': path.resolve(__dirname, 'eventcatalog/src/snippets'),
'@types': path.resolve(__dirname, 'eventcatalog/src/types/index.ts'),
'@utils': path.resolve(__dirname, 'eventcatalog/src/utils'),
'@layouts': path.resolve(__dirname, 'eventcatalog/src/layouts'),
'@enterprise': path.resolve(__dirname, 'eventcatalog/src/enterprise'),
'@ai': path.resolve(__dirname, 'eventcatalog/src/generated-ai'),
'auth:config': path.resolve(__dirname, 'eventcatalog/auth.config.ts'),
},
},
});