๐Ÿ“ฆ Stirling-Tools / Stirling-PDF

๐Ÿ“„ vitest.config.ts ยท 89 lines
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89import { defineConfig } from 'vitest/config';
import react from '@vitejs/plugin-react-swc';
import tsconfigPaths from 'vite-tsconfig-paths';

export default defineConfig({
  test: {
    globals: true,
    environment: 'jsdom',
    setupFiles: ['./src/core/setupTests.ts'],
    css: false,
    exclude: [
      'node_modules/',
      'src/**/*.spec.ts', // Exclude Playwright E2E tests
      'src/tests/test-fixtures/**'
    ],
    testTimeout: 10000,
    hookTimeout: 10000,
    coverage: {
      reporter: ['text', 'json', 'html'],
      exclude: [
        'node_modules/',
        'src/core/setupTests.ts',
        '**/*.d.ts',
        'src/tests/test-fixtures/**',
        'src/**/*.spec.ts'
      ]
    },
    projects: [
      {
        test: {
          name: 'core',
          include: ['src/core/**/*.test.{ts,tsx}'],
          environment: 'jsdom',
          globals: true,
          setupFiles: ['./src/core/setupTests.ts'],
        },
        plugins: [
          react(),
          tsconfigPaths({
            projects: ['./tsconfig.core.json'],
          }),
        ],
        esbuild: {
          target: 'es2020'
        }
      },
      {
        test: {
          name: 'proprietary',
          include: ['src/proprietary/**/*.test.{ts,tsx}'],
          environment: 'jsdom',
          globals: true,
          setupFiles: ['./src/core/setupTests.ts'],
        },
        plugins: [
          react(),
          tsconfigPaths({
            projects: ['./tsconfig.proprietary.json'],
          }),
        ],
        esbuild: {
          target: 'es2020'
        }
      },
      {
        test: {
          name: 'desktop',
          include: ['src/desktop/**/*.test.{ts,tsx}'],
          environment: 'jsdom',
          globals: true,
          setupFiles: ['./src/core/setupTests.ts'],
        },
        plugins: [
          react(),
          tsconfigPaths({
            projects: ['./tsconfig.desktop.json'],
          }),
        ],
        esbuild: {
          target: 'es2020'
        }
      },
    ],
  },
  esbuild: {
    target: 'es2020'
  }
});