mirror of
https://github.com/johndoe6345789/postgres.git
synced 2026-04-25 06:15:02 +00:00
44 lines
1.1 KiB
TypeScript
44 lines
1.1 KiB
TypeScript
import react from '@vitejs/plugin-react';
|
|
import { playwright } from '@vitest/browser-playwright';
|
|
import { loadEnv } from 'vite';
|
|
import tsconfigPaths from 'vite-tsconfig-paths';
|
|
import { defineConfig } from 'vitest/config';
|
|
|
|
export default defineConfig({
|
|
plugins: [react(), tsconfigPaths()],
|
|
test: {
|
|
coverage: {
|
|
include: ['src/**/*'],
|
|
exclude: ['src/**/*.stories.{js,jsx,ts,tsx}'],
|
|
},
|
|
projects: [
|
|
{
|
|
extends: true,
|
|
test: {
|
|
name: 'unit',
|
|
include: ['src/**/*.test.{js,ts}'],
|
|
exclude: ['src/hooks/**/*.test.ts'],
|
|
environment: 'node',
|
|
},
|
|
},
|
|
{
|
|
extends: true,
|
|
test: {
|
|
name: 'ui',
|
|
include: ['**/*.test.tsx', 'src/hooks/**/*.test.ts'],
|
|
browser: {
|
|
enabled: true,
|
|
headless: true,
|
|
provider: playwright(),
|
|
screenshotDirectory: 'vitest-test-results',
|
|
instances: [
|
|
{ browser: 'chromium' },
|
|
],
|
|
},
|
|
},
|
|
},
|
|
],
|
|
env: loadEnv('', process.cwd(), ''),
|
|
},
|
|
});
|