-
Notifications
You must be signed in to change notification settings - Fork 59
Expand file tree
/
Copy pathvitest.config.js
More file actions
36 lines (35 loc) 路 1019 Bytes
/
Copy pathvitest.config.js
File metadata and controls
36 lines (35 loc) 路 1019 Bytes
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
/**
* SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import { fileURLToPath } from 'node:url'
import vue from '@vitejs/plugin-vue'
import { defineConfig } from 'vitest/config'
export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
},
},
test: {
environment: 'jsdom',
globals: true,
setupFiles: ['./tests/js/setup.js'],
include: ['src/**/*.{test,spec}.js', 'tests/js/**/*.{test,spec}.js'],
css: false,
// @nextcloud/vue ships ESM that imports its own CSS; let Vite process it
// instead of handing the .css files to Node.
server: {
deps: {
inline: [/@nextcloud\/vue/, /@nextcloud\/dialogs/],
},
},
coverage: {
provider: 'v8',
include: ['src/**/*.{js,vue}'],
exclude: ['src/**/*.test.js', 'src/main.js', 'src/dashboard.js', 'src/oauth.js', 'src/ostatus.js', 'src/profile.js'],
reportsDirectory: './coverage/js',
},
},
})