mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-03-22 23:30:36 +08:00
#### PR Dependency Tree * **PR #14569** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Upgraded development test tooling to Vitest v4 and added Playwright browser test integration; normalized test configurations and CI shard matrix. * **Tests** * Added a large suite of new integration tests covering editor flows (edgeless, database, embeds, images, latex, code, clipboard, multi-editor, presentation, undo/redo, etc.). * Removed numerous end-to-end Playwright test suites across the same feature areas. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
46 lines
1.2 KiB
TypeScript
46 lines
1.2 KiB
TypeScript
import { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin';
|
|
import { playwright } from '@vitest/browser-playwright';
|
|
import { defineConfig } from 'vitest/config';
|
|
|
|
export default defineConfig(_configEnv =>
|
|
defineConfig({
|
|
esbuild: { target: 'es2018' },
|
|
optimizeDeps: {
|
|
force: true,
|
|
esbuildOptions: {
|
|
// Vitest hardcodes the esbuild target to es2020,
|
|
// override it to es2022 for top level await.
|
|
target: 'es2022',
|
|
},
|
|
},
|
|
plugins: [vanillaExtractPlugin()],
|
|
test: {
|
|
include: ['src/__tests__/**/*.spec.ts'],
|
|
retry: process.env.CI === 'true' ? 3 : 0,
|
|
browser: {
|
|
enabled: true,
|
|
headless: true,
|
|
instances: [
|
|
{ browser: 'chromium' },
|
|
{ browser: 'firefox' },
|
|
{ browser: 'webkit' },
|
|
],
|
|
provider: playwright(),
|
|
isolate: false,
|
|
viewport: {
|
|
width: 1024,
|
|
height: 768,
|
|
},
|
|
},
|
|
coverage: {
|
|
provider: 'istanbul',
|
|
reporter: ['lcov'],
|
|
reportsDirectory: '../../.coverage/integration-test',
|
|
},
|
|
deps: {
|
|
interopDefault: true,
|
|
},
|
|
},
|
|
})
|
|
);
|