AFFiNE/vitest.config.ts

34 lines
886 B
TypeScript
Raw Normal View History

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