mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-23 21:11:51 +03:00
34 lines
936 B
TypeScript
34 lines
936 B
TypeScript
/**
|
|
* For unit tests.
|
|
*/
|
|
import type { PlaywrightTestConfig } from '@playwright/test';
|
|
|
|
const config: PlaywrightTestConfig = {
|
|
testDir: './packages/',
|
|
timeout: 30 * 1000,
|
|
expect: {
|
|
/**
|
|
* Maximum time expect() should wait for the condition to be met.
|
|
* For example in `await expect(locator).toHaveText();`
|
|
*/
|
|
timeout: 5000,
|
|
},
|
|
fullyParallel: true,
|
|
forbidOnly: !!process.env.CI,
|
|
retries: process.env.CI ? 2 : 0,
|
|
workers: process.env.CI ? 1 : undefined,
|
|
use: {
|
|
actionTimeout: 0,
|
|
|
|
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
|
trace: 'on-first-retry',
|
|
},
|
|
|
|
// 'github' for GitHub Actions CI to generate annotations, plus a concise 'dot'
|
|
// default 'list' when running locally
|
|
// See https://playwright.dev/docs/test-reporters#github-actions-annotations
|
|
reporter: process.env.CI ? 'github' : 'list',
|
|
};
|
|
|
|
export default config;
|