Files
AFFiNE-Mirror/blocksuite/framework/sync/vitest.config.ts
2024-12-20 15:38:06 +08:00

24 lines
559 B
TypeScript

import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
include: ['src/__tests__/**/*.unit.spec.ts'],
testTimeout: 500,
coverage: {
provider: 'istanbul', // or 'c8'
reporter: ['lcov'],
reportsDirectory: '../../../.coverage/sync',
},
/**
* Custom handler for console.log in tests.
*
* Return `false` to ignore the log.
*/
onConsoleLog(log, type) {
console.warn(`Unexpected ${type} log`, log);
throw new Error(log);
},
restoreMocks: true,
},
});