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 -->
31 lines
763 B
TypeScript
31 lines
763 B
TypeScript
import { defineConfig } from 'vitest/config';
|
|
|
|
export default defineConfig({
|
|
esbuild: {
|
|
target: 'es2018',
|
|
},
|
|
test: {
|
|
globalSetup: '../../../scripts/vitest-global.js',
|
|
include: ['src/__tests__/**/*.unit.spec.ts'],
|
|
testTimeout: 1000,
|
|
coverage: {
|
|
provider: 'istanbul', // or 'istanbul'
|
|
reporter: ['lcov'],
|
|
reportsDirectory: '../../../.coverage/affine-shared',
|
|
},
|
|
/**
|
|
* Custom handler for console.log in tests.
|
|
*
|
|
* Return `false` to ignore the log.
|
|
*/
|
|
onConsoleLog(log, type) {
|
|
if (log.includes('https://lit.dev/msg/dev-mode')) {
|
|
return false;
|
|
}
|
|
console.warn(`Unexpected ${type} log`, log);
|
|
throw new Error(log);
|
|
},
|
|
environment: 'happy-dom',
|
|
},
|
|
});
|