pnpm install -D vitest-teamcity-reporter
npm install -D vitest-teamcity-reporter
Add new custom reporter vite.config.ts
import {defineConfig} from 'vitest/config';
export default defineConfig({
test: {
// path to reporter
reporters: 'vitest-teamcity-reporter',
},
// optionaly config
coverage: {
// enable "Reporting Build Statistics"
reporter: ['teamcity'],
}
});
For enabling "Reporting Build Statistics" for TeamCity you may add a "teamcity" coverage reporter that is the default provided by vitest ( vitest doc, istanbul doc )