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 -->
36 lines
980 B
TypeScript
36 lines
980 B
TypeScript
// TODO(@forehalo): reuse '@affine-tools/utils' once it's ready to switch to esm module
|
|
import { resolve } from 'node:path';
|
|
import { fileURLToPath } from 'node:url';
|
|
|
|
import react from '@vitejs/plugin-react-swc';
|
|
import { defineConfig } from 'vitest/config';
|
|
|
|
const rootDir = fileURLToPath(new URL('../../../..', import.meta.url));
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
resolve: {
|
|
alias: {
|
|
// prevent tests using two different sources of yjs
|
|
yjs: resolve(rootDir, 'node_modules/yjs'),
|
|
'@affine/electron': resolve(
|
|
rootDir,
|
|
'packages/frontend/apps/electron/src'
|
|
),
|
|
},
|
|
},
|
|
|
|
test: {
|
|
setupFiles: [resolve(rootDir, './scripts/setup/global.ts')],
|
|
include: ['./test/**/*.spec.ts'],
|
|
testTimeout: 5000,
|
|
pool: 'forks',
|
|
maxWorkers: 1,
|
|
coverage: {
|
|
provider: 'istanbul', // or 'istanbul'
|
|
reporter: ['lcov'],
|
|
reportsDirectory: resolve(rootDir, '.coverage/electron'),
|
|
},
|
|
},
|
|
});
|