mirror of
https://github.com/vector-im/element-call.git
synced 2024-11-15 00:04:59 +08:00
2a9f6663c1
- add vitest configuration - update tsconfig.json so that test files does not throw error with global definitions such as expect, test
31 lines
747 B
JavaScript
31 lines
747 B
JavaScript
import { defineConfig, mergeConfig } from 'vitest/config'
|
|
import viteConfig from './vite.config'
|
|
|
|
export default defineConfig(configEnv => mergeConfig(
|
|
viteConfig(configEnv),
|
|
defineConfig({
|
|
test: {
|
|
globals: true,
|
|
environment: 'jsdom',
|
|
alias: {
|
|
"\\.css$": "identity-obj-proxy",
|
|
"\\.svg\\?react$": "<rootDir>/test/mocks/svgr.ts",
|
|
"^\\./IndexedDBWorker\\?worker$": "<rootDir>/test/mocks/workerMock.ts",
|
|
"^\\./olm$": "<rootDir>/test/mocks/olmMock.ts"
|
|
},
|
|
css: {
|
|
modules: {
|
|
classNameStrategy: 'non-scoped'
|
|
}
|
|
},
|
|
include: [
|
|
"test/**/*-test.[jt]s?(x)"
|
|
],
|
|
coverage: {
|
|
reporter: ['text', 'html'],
|
|
exclude: [
|
|
'node_modules/'
|
|
]
|
|
}
|
|
}
|
|
}))) |