vitest/test/coverage-test/vitest.config.ts

26 lines
586 B
TypeScript

import { defineConfig } from 'vitest/config'
export default defineConfig({
test: {
reporters: 'basic',
isolate: false,
poolOptions: {
threads: {
// Tests may have side effects, e.g. writing files to disk,
singleThread: true,
},
},
onConsoleLog(log) {
if (log.includes('ERROR: Coverage for')) {
// Ignore threshold error messages
return false
}
if (log.includes('Updating thresholds to configuration file.')) {
// Ignore threshold updating messages
return false
}
},
},
})