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