-
Couldn't load subscription status.
- Fork 129
Open
Description
🐛 allure-vitest incompatible with Vitest 4.0 - Test results not generated
Description
The allure-vitest reporter (v3.4.1) is not compatible with Vitest 4.0.x and fails to generate test results correctly. The allure-results folder remains empty or is not created at all when running tests with Vitest 4.0.
Environment
- allure-vitest version: 3.4.1
- vitest version: 4.0.3
- Node version: 22.x
- OS: Linux (CI: GitHub Actions)
- Test environment: jsdom
Configuration
// [vite.config.ts](http://_vscodecontentref_/0)
export default defineConfig({
test: {
environment: 'jsdom',
setupFiles: ['allure-vitest/setup', './test-globals.ts'],
globals: true,
restoreMocks: true,
clearMocks: true,
mockReset: true,
isolate: true,
pool: 'forks',
testTimeout: 30000,
reporters: [
'default',
['allure-vitest/reporter', {
resultsDir: './allure-results',
}]
],
},
})Steps to Reproduce
- Install Vitest 4.0.3 and allure-vitest 3.4.1
npm install -D [email protected] [email protected]-
Configure Vitest with the above settings
-
Run tests with:
vitest run --reporter=default --reporter=allure-vitest/reporter- Check the allure-results folder
Expected Behavior
allure-resultsfolder should be created- Test result JSON files should be generated for each test suite
- Allure reports should be accessible for CI/CD pipelines
Actual Behavior
allure-resultsfolder is either empty or not created- No test result JSON files are generated
- CI/CD pipeline fails with:
Error: No artifacts found matching pattern 'Allure Results - *'
Additional Context
Vitest 4.0 Breaking Changes Affecting This Issue
Vitest 4.0 introduced several changes that may affect reporters:
- New test isolation model with
isolate: true - New worker pool system (
pool: 'forks'vspool: 'threads') - Changes to how reporters are executed in parallel test runs
- Global mock reset behavior changes
Workarounds Attempted
We tried the following without success:
- ✅ Explicit
resultsDirconfiguration - ✅ Different pool strategies (
threads,forks) - ✅ Disabling
isolatemode - ✅ Using different reporter configurations
- ❌ None of these resolved the issue
Works Correctly With
- Vitest 3.x: allure-vitest works perfectly
- Downgrading to Vitest 3.5.x resolves the issue completely
Impact
This issue is blocking our Vitest 4.0 upgrade as:
- Test reports are required for our CI/CD pipeline
- We rely on Allure reports for test documentation and tracking
- Without working reports, we cannot complete the upgrade
Requested Action
Please update allure-vitest to support Vitest 4.0.x compatibility. This would allow teams to benefit from:
- Vitest 4.0 performance improvements
- Better test isolation
- Improved mock handling
- Latest Vitest features
Related Links
- Vitest 4.0 Release Notes: https://github.com/vitest-dev/vitest/releases/tag/v4.0.0
- Our reproduction repository: [if available]
Thank you for maintaining this excellent testing framework integration! 🙏
Metadata
Metadata
Assignees
Labels
No labels