Reputation: 390
I set up Vitest in a React/Vite project, everything runs fine and the tests work. But as we added the report to our server as html report the page stays blank. There is not even a console error. Also when running the html report locally with:
npx vite preview --outDir reports/html
nothing happens. Maybe someone already had the same problem and knows how to solve it? This is our test property in the vite.config:
test: {
globals: true,
environment: 'jsdom',
setupFiles: ['src/setupTest.ts'],
reporters: ['junit', 'html'],
outputFile: { junit: './reports/junit/junit-report.xml', html: './reports/html/index.html' },
coverage: {
reportsDirectory: './reports/coverage',
reporter: ['cobertura'],
},
},
Thanks in advance!
Upvotes: 2
Views: 1091