mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-12 13:13:45 +01:00
26 lines
535 B
TypeScript
26 lines
535 B
TypeScript
import { defineConfig, ViteUserConfig } from 'vitest/config'
|
|
|
|
let reporterOptions: ViteUserConfig['test'] = {}
|
|
if (process.env.CI) {
|
|
reporterOptions = {
|
|
reporters: [
|
|
'default',
|
|
[
|
|
'junit',
|
|
{
|
|
classnameTemplate: `Unit tests.{filename}`,
|
|
},
|
|
],
|
|
],
|
|
outputFile: 'reports/junit-vitest-unit.xml',
|
|
}
|
|
}
|
|
export default defineConfig({
|
|
test: {
|
|
include: ['test/unit/**/*.test.{js,ts}'],
|
|
setupFiles: ['./test/setup.js'],
|
|
isolate: false,
|
|
...reporterOptions,
|
|
},
|
|
})
|