2023-03-01 10:40:01 +03:00
|
|
|
import path from 'node:path';
|
|
|
|
|
|
|
|
import react from '@vitejs/plugin-react';
|
2023-02-17 05:43:52 +03:00
|
|
|
import { defineConfig } from 'vitest/config';
|
|
|
|
|
|
|
|
export default defineConfig({
|
2023-03-01 10:40:01 +03:00
|
|
|
plugins: [react()],
|
|
|
|
resolve: {
|
|
|
|
alias: {
|
|
|
|
'next/router': 'next-router-mock',
|
|
|
|
'next/config': path.resolve('./scripts/vitest/next-config-mock.ts'),
|
|
|
|
},
|
|
|
|
},
|
2023-02-17 05:43:52 +03:00
|
|
|
test: {
|
2023-03-01 10:40:01 +03:00
|
|
|
include: [
|
|
|
|
'packages/**/*.spec.ts',
|
2023-03-01 23:46:20 +03:00
|
|
|
'apps/web/**/*.spec.ts',
|
|
|
|
'apps/web/**/*.spec.tsx',
|
2023-03-01 10:40:01 +03:00
|
|
|
],
|
2023-02-17 05:43:52 +03:00
|
|
|
testTimeout: 5000,
|
|
|
|
coverage: {
|
|
|
|
provider: 'istanbul', // or 'c8'
|
|
|
|
reporter: ['lcov'],
|
|
|
|
reportsDirectory: '.coverage/store',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|