mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02:00
* [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
30 lines
657 B
JavaScript
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,
|
|
},
|
|
})
|