-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Expand file tree
/
Copy pathvitest.config.ts
More file actions
38 lines (36 loc) · 1.13 KB
/
Copy pathvitest.config.ts
File metadata and controls
38 lines (36 loc) · 1.13 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
import { qwikVite } from '@qwik.dev/core/optimizer';
import { fileURLToPath } from 'node:url';
import tsconfigPaths from 'vite-tsconfig-paths';
import { defineConfig } from 'vitest/config';
const fromRoot = (path: string) => fileURLToPath(new URL(path, import.meta.url));
export default defineConfig({
// temporary fix to allow tests to run without the kit package, remove this once we have a proper kit package
resolve: {
alias: {
'@qwik.dev/devtools/kit': fromRoot('./packages/devtools/kit/src/index.ts'),
},
},
plugins: [
qwikVite({
tsOptimizer: true,
debug: !true,
srcDir: fromRoot('./packages/qwik/src'),
devTools: { hmr: false },
experimental: ['each', 'show', 'pendingBoundary', 'catchBoundary'],
}),
tsconfigPaths({ ignoreConfigErrors: true, loose: true }),
],
test: {
root: fromRoot('./packages'),
include: [
'**/*.spec.*',
'**/*.unit.*',
'!*/(lib|dist|build|server|target)/**',
'!**/node_modules/**',
'!**/__snapshots__/**',
],
setupFiles: [fromRoot('./vitest-setup.ts')],
projects: ['..'],
testTimeout: 10000,
},
});