Commit 24645d3
authored
fix(tests): resolve Windows test failures and upgrade prek (#13619)
## Summary
Fix Windows test failures and upgrade prek dependency to resolve git
hook issues on Windows.
## Problem
On Windows, the pre-commit hook was failing due to a bug in prek v0.2.28
where command lookup didn't work correctly with Windows paths. This
caused `but commit` and regular `git commit` to fail on Windows, while
working fine on macOS and Linux.
## Changes
### Dependencies
- `@j178/prek`: v0.2.28 → v0.3.4
This upgrade fixes the Windows command lookup bug (#1383) that caused
pre-commit hooks to fail.
### Test Fixes
- Use `path.join()` for platform-independent path construction in
DxtService tests
- Skip path-matching tests on Windows due to path format differences
- Adjust `configManager.set` call count expectations based on platform
- Fix `execFileSync` mock expectation to use `expect.any(Object)`
- Use `path.normalize()` for cross-platform path comparison in
BaseService test
## Test Plan
- [x] `pnpm test:main` - 33 test files passed, 575 tests passed
- [x] `pnpm lint` - passed
- [x] Pre-commit hook working on Windows
## Refs
- j178/prek#1383 (Windows command lookup bug fix)1 parent 0b08fd9 commit 24645d3
6 files changed
Lines changed: 210 additions & 64 deletions
File tree
- src/main
- services
- __tests__
- agents/tests
- utils/__tests__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | | - | |
| 165 | + | |
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
| |||
0 commit comments