-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathvitest.config.js
More file actions
executable file
·24 lines (23 loc) · 919 Bytes
/
vitest.config.js
File metadata and controls
executable file
·24 lines (23 loc) · 919 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
import { defineConfig } from 'vitest/config';
import path from 'node:path';
export default defineConfig({
// This repo uses JSX in some .js files (e.g. components/I18nContext.js).
// Teach Vite's pipeline to parse those during Vitest runs.
esbuild: {
loader: 'jsx',
jsx: 'automatic',
},
resolve: {
alias: {
'tauri-plugin-screenshots-api': path.resolve(__dirname, 'tests/mocks/tauri-plugin-screenshots-api.js'),
'@theme-toggles/react': path.resolve(__dirname, 'tests/mocks/theme-toggles-react.js'),
'@theme-toggles/react/css/Classic.css': path.resolve(__dirname, 'tests/mocks/empty-style.js'),
},
},
test: {
environment: 'jsdom',
setupFiles: ['./vitest.setup.js'],
include: ['tests/**/*.test.{js,jsx,ts,tsx}'],
exclude: ['**/*.smoke.test.*', '**/node_modules/**', '**/dist/**', '**/build/**', '**/build-target/**', '**/build-temp/**', '**/._*'],
},
});