playwright.config.ts 617 B

12345678910111213141516171819202122232425
  1. /* eslint-disable import/no-extraneous-dependencies */
  2. import type {PlaywrightTestConfig} from '@playwright/test';
  3. import {devices} from '@playwright/test';
  4. // Use a distinct port on CI to avoid conflicts during concurrent tests
  5. const PORT = process.env.CI ? 3001 : 3000;
  6. const config: PlaywrightTestConfig = {
  7. retries: process.env.CI ? 1 : 0,
  8. testDir: './tests',
  9. projects: [
  10. {
  11. name: 'chromium',
  12. use: devices['Desktop Chrome']
  13. }
  14. ],
  15. fullyParallel: true,
  16. webServer: {
  17. command: `PORT=${PORT} pnpm start`,
  18. port: PORT,
  19. reuseExistingServer: true
  20. }
  21. };
  22. export default config;