-
Notifications
You must be signed in to change notification settings - Fork 527
Expand file tree
/
Copy pathvitest.config.js
More file actions
35 lines (33 loc) · 1.1 KB
/
vitest.config.js
File metadata and controls
35 lines (33 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
/*
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import vue from '@vitejs/plugin-vue'
import { resolve } from 'node:path'
import { defineConfig } from 'vitest/config'
export default defineConfig({
plugins: [vue()],
assetsInclude: ['**/*.tflite', '**/*.wasm'],
test: {
include: ['src/**/*.{test,spec}.?(c|m)[jt]s?(x)'],
server: {
deps: {
// Allow importing CSS from dependencies
inline: ['@nextcloud/vue'],
},
},
alias: [
{ find: './vendor/tflite/tflite.wasm', replacement: resolve(import.meta.dirname, 'src/utils/media/effects/virtual-background/vendor/tflite/tflite.js') },
{ find: './vendor/tflite/tflite-simd.wasm', replacement: resolve(import.meta.dirname, 'src/utils/media/effects/virtual-background/vendor/tflite/tflite-simd.js') },
{ find: '@matrix-org/olm/olm.wasm', replacement: '@matrix-org/olm/olm.js' },
],
environment: 'jsdom',
environmentOptions: {
jsdom: {
url: 'http://localhost',
},
},
setupFiles: ['src/test-setup.js'],
globalSetup: 'src/test-global-setup.js',
},
})