Files
photoview/ui/vite.config.js
Kostiantyn 6c020cc1f9 Enhance Codecov integration (#1136)
* Define sub-projects and set coverage threshold for failure in the `codecov.yml`; make both test execution engines to generate also JUnit reports; upload these JUnit reports to Codecov for analysis

* Fix UI Vite config and add more details to the API is-generated-code script

* Add API JUnit report file to `.gitignore`

* Fix the copy issue by mounting the volume

* put the exact report name to the `docker cp` command

* Added `set -euxo pipeline` to the `test_api_coverage.sh` script; try to fix the missing report issue by setting immutable flag and report directoty

* Revert `chattr` and `set` commands, as they cause errors

* debug

* put the filename of the JUnit report to upload

* `set -euxo pipefail` in `scripts/test_api_coverage.sh`

---------

Co-authored-by: Konstantin Koval
2024-11-25 16:25:38 +02:00

30 lines
662 B
JavaScript

/// <reference types="vitest" />
/// <reference types="vite/client" />
import { defineConfig } from 'vite'
import svgr from 'vite-plugin-svgr'
import react from '@vitejs/plugin-react'
export default defineConfig({
plugins: [react(), svgr()],
envPrefix: ['VITE_', 'REACT_APP_'],
server: {
port: 1234,
},
esbuild: {
logOverride: { 'this-is-undefined-in-esm': 'silent' },
},
test: {
globals: true,
environment: 'jsdom',
setupFiles: './testing/setupTests.ts',
reporters: ['verbose', 'junit'],
outputFile: {
junit: './junit-report.xml',
},
coverage: {
reporter: ['text', 'json', 'html'],
},
},
})