-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.js
More file actions
42 lines (41 loc) · 1.35 KB
/
vitest.config.js
File metadata and controls
42 lines (41 loc) · 1.35 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 { playwright } from '@vitest/browser-playwright';
import vue from '@vitejs/plugin-vue';
import { fileURLToPath, URL } from 'node:url';
export default defineConfig({
plugins: [vue()],
test: {
browser: {
enabled: true,
provider: playwright(),
instances: [
{
browser: 'chromium',
viewport: { width: 1920, height: 1080 },
},
{
browser: 'firefox',
viewport: { width: 1920, height: 1080 },
}
],
headless: true,
},
globals: true,
hookTimeout: 5000,
testTimeout: 5000,
snapshotSerializers: ['./node_modules/vue3-snapshot-serializer/index.js'],
screenshotDirectory: 'tests/__screenshots__',
resolveSnapshotPath: (testPath, snapExtension) => {
return testPath.replace('/src/', '/tests/__snapshots__/') + snapExtension;
},
setupFiles: ['./tests/browser-setup.ts'],
},
optimizeDeps: {
include: ['primevue/config', '@primeuix/themes/lara', 'pinia-plugin-persistedstate', 'primevue/focustrap'],
},
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
},
},
});