Files
ProxmoxVE-Local/test/scripts/script2.py
Michel Roegl-Brunner 1378a10d69 fix: resolve failing tests by fixing mock setup
- Fixed fs/promises mocks using vi.hoisted() for proper hoisting
- Fixed child_process spawn mocks with proper default exports
- Updated test cases to use direct mock function references
- All 55 tests now passing successfully

The main issues were:
1. Mock functions not properly hoisted causing reference errors
2. Missing default exports in module mocks
3. Incorrect mock function usage in test assertions

Tests now properly mock:
- readdir, stat, readFile from fs/promises
- spawn from child_process
- localScriptsService.getScriptBySlug
2025-09-11 11:32:56 +02:00

0 lines
0 B
Python