Files
overleaf-cep/services/web/vitest.config.js
Jakob Ackermann c3c04acfea [web] add junit integration for Jenkins (#28788)
* [web] add junit integration for Jenkins

* [web] integrate junit test report for writefull into Jenkins

* [web] put all the junit test results into namespaces

GitOrigin-RevId: ba1ff07b5ea7bcfa97bb4d6bf7fa9e5291ab7b0f
2025-10-02 08:06:25 +00:00

30 lines
657 B
JavaScript

const { defineConfig } = require('vitest/config')
let reporterOptions = {}
if (process.env.CI && process.env.MOCHA_ROOT_SUITE_NAME) {
reporterOptions = {
reporters: [
'default',
[
'junit',
{
classnameTemplate: `${process.env.MOCHA_ROOT_SUITE_NAME}.{filename}`,
},
],
],
outputFile: 'data/reports/junit-vitest.xml',
}
}
module.exports = defineConfig({
test: {
include: [
'modules/*/test/unit/**/*.test.mjs',
'test/unit/src/**/*.test.mjs',
],
setupFiles: ['./test/unit/vitest_bootstrap.mjs'],
globals: true,
isolate: false,
...reporterOptions,
},
})