Skip to content

Commit 24645d3

Browse files
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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@
162162
"@floating-ui/dom": "1.7.3",
163163
"@google/genai": "1.0.1",
164164
"@hello-pangea/dnd": "^18.0.1",
165-
"@j178/prek": "^0.2.28",
165+
"@j178/prek": "^0.3.4",
166166
"@kangfenmao/keyv-storage": "^0.1.3",
167167
"@langchain/community": "^1.0.0",
168168
"@langchain/core": "1.0.2",

0 commit comments

Comments
 (0)