We have migrated the testing framework from Jest to Vitest for the Docs application. This change includes updates to test files, configuration files, and the addition of new setup files for Vitest.
26 lines
513 B
TypeScript
26 lines
513 B
TypeScript
/// <reference types="vitest" />
|
|
import react from '@vitejs/plugin-react';
|
|
import tsconfigPaths from 'vite-tsconfig-paths';
|
|
import { defineConfig } from 'vitest/config';
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
react(),
|
|
tsconfigPaths({
|
|
root: '.',
|
|
projects: ['./tsconfig.json'],
|
|
}),
|
|
],
|
|
test: {
|
|
globals: true,
|
|
environment: 'jsdom',
|
|
setupFiles: './vitest.setup.ts',
|
|
coverage: {
|
|
provider: 'v8',
|
|
},
|
|
},
|
|
define: {
|
|
'process.env.NODE_ENV': 'test',
|
|
},
|
|
});
|