Some checks failed
LabFusion CI/CD Pipeline / api-gateway (push) Failing after 41s
Docker Build and Push / build-and-push (push) Failing after 41s
LabFusion CI/CD Pipeline / service-adapters (push) Successful in 57s
Integration Tests / integration-tests (push) Failing after 40s
Integration Tests / performance-tests (push) Has been skipped
LabFusion CI/CD Pipeline / api-docs (push) Successful in 1m44s
Frontend (React) / test (20) (push) Failing after 1m29s
Frontend (React) / build (push) Has been skipped
Frontend (React) / lighthouse (push) Has been skipped
LabFusion CI/CD Pipeline / frontend (push) Successful in 4m1s
LabFusion CI/CD Pipeline / integration-tests (push) Has been skipped
### Summary of Changes - Updated the test command in the CI workflow to use `npx vitest` for running tests with coverage. - Added a verification step to check for the presence of coverage files (`lcov.info` and `clover.xml`). - Configured Vitest to output JUnit test results and detailed coverage reports in the specified directory. ### Expected Results - Improved visibility and reliability of test coverage metrics, facilitating better quality assurance processes.
28 lines
667 B
JavaScript
28 lines
667 B
JavaScript
import { defineConfig } from 'vitest/config';
|
|
import react from '@vitejs/plugin-react';
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
test: {
|
|
environment: 'jsdom',
|
|
setupFiles: ['./src/setupTests.js'],
|
|
globals: true,
|
|
reporter: ['verbose', 'junit'],
|
|
outputFile: {
|
|
junit: './coverage/test-results.xml'
|
|
},
|
|
coverage: {
|
|
provider: 'v8',
|
|
reporter: ['text', 'html', 'lcov', 'clover'],
|
|
reportsDirectory: './coverage',
|
|
include: ['src/**/*.{js,jsx}'],
|
|
exclude: [
|
|
'src/**/*.test.{js,jsx}',
|
|
'src/**/*.spec.{js,jsx}',
|
|
'src/setupTests.js',
|
|
'src/index.js'
|
|
]
|
|
}
|
|
},
|
|
});
|