Files
overleaf-cep/services/real-time/vitest.config.unit.cjs
Anna Claire Fields a63fd554c3 Replace MOCHA_GREP with TEST_NAME_PATTERN (#34404)
GitOrigin-RevId: b1b2d1be3d0725f930d83ef035836482ffb72dcd
2026-09-17 11:45:29 +00:00

27 lines
575 B
JavaScript

const { defineConfig } = require('vitest/config')
let reporterOptions = {}
if (process.env.CI) {
reporterOptions = {
reporters: [
'default',
[
'junit',
{
classnameTemplate: `Unit tests.{filename}`,
},
],
],
outputFile: 'reports/junit-vitest-unit.xml',
}
}
module.exports = defineConfig({
test: {
include: ['test/unit/js/**/*.test.{js,ts}'],
setupFiles: ['./test/unit/setup.js'],
isolate: false,
testNamePattern: process.env.TEST_NAME_PATTERN || undefined,
...reporterOptions,
},
})