Files
overleaf-cep/libraries/fetch-utils/vitest.config.ts
T
Andrew Rumble 05423f1a1d Merge pull request #34344 from overleaf/copilot/convert-fetch-utils-to-es-modules
Convert @overleaf/fetch-utils to TypeScript ESM with Vitest, enable noImplicitAny, fix downstream regressions, and align buildscript generation

GitOrigin-RevId: e060152f056cbae31da0650fb22471525835bd5e
2026-09-17 11:24:05 +00:00

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,
},
})