-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathvitest.config.ts
More file actions
49 lines (47 loc) · 1.1 KB
/
vitest.config.ts
File metadata and controls
49 lines (47 loc) · 1.1 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
43
44
45
46
47
48
49
/**
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import vue from '@vitejs/plugin-vue'
import { playwright } from '@vitest/browser-playwright'
import { nodePolyfills } from 'vite-plugin-node-polyfills'
import { defineConfig } from 'vitest/config'
export default defineConfig({
plugins: [
vue(),
nodePolyfills(),
],
optimizeDeps: {
include: [
'node:module',
'vite-plugin-node-polyfills/shims/buffer',
'vite-plugin-node-polyfills/shims/global',
'vite-plugin-node-polyfills/shims/process',
],
},
// Setup for vitest unit tests
test: {
include: ['src/**/*.{test,spec}.?(c|m)[jt]s?(x)'],
browser: {
provider: playwright(),
enabled: true,
headless: true,
screenshotFailures: false,
instances: [
{ browser: 'chromium' },
],
},
coverage: {
include: ['src/**'],
exclude: ['**.spec.*', '**.test.*', '**.cy.*'],
provider: 'v8',
reporter: ['lcov', 'text'],
},
setupFiles: ['__tests__/setup-testing-library.ts'],
server: {
deps: {
inline: [/@nextcloud\//],
},
},
},
})