Files
shancheas 67e1e0a74f feat: integrate Playwright for E2E testing and enhance testing framework
- Added Playwright for end-to-end testing in the `apps/web` module, including a new `login.spec.ts` for testing login functionality.
- Updated package.json to include Playwright dependencies and new test commands for E2E testing.
- Enhanced .gitignore to exclude Playwright test results and reports.
- Modified existing documentation to reflect the integration of Playwright and updated testing guidelines.
- Refactored test commands to streamline the testing process, including a dedicated command for E2E tests.

These changes improve the testing framework by providing robust E2E testing capabilities, enhancing the reliability and quality of the application.
2026-08-31 11:52:27 +07:00

27 lines
665 B
TypeScript

import { defineConfig } from 'vitest/config';
import react from '@vitejs/plugin-react';
import tailwindcss from '@tailwindcss/vite';
export default defineConfig({
plugins: [react(), tailwindcss()],
server: {
port: 5173,
strictPort: true, // Fail if 5173 is in use. Electron NEEDS this exact port.
},
define: {
// Crucial for PouchDB to not crash in the browser
global: 'window',
},
resolve: {
alias: {
// Force Vite to use the installed npm package for 'events'
events: 'events',
},
},
test: {
environment: 'node',
globals: false,
exclude: ['**/node_modules/**', '**/dist/**', '**/e2e/**'],
},
});