Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
test(shared): verify legacy Windows path fallback
  • Loading branch information
breken-ai committed Sep 27, 2026
commit 0dc961916e2c336d0078378deb582448defc3770
10 changes: 8 additions & 2 deletions packages/shared/src/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,15 @@ describe('getRepoPath', () => {
test(
'normalizes legacy Windows file URL pathnames before checking the filesystem',
() => {
const cloneUrl = new URL('file://C:\\Users\\me\\100%20Free');
const nativePath = 'C:\\Users\\me\\100%20Free';
const legacyPathname = cloneUrl.pathname;

expect(legacyPathname).toBe('/C:/Users/me/100%20Free');
expect(path.win32.normalize(legacyPathname)).not.toBe(nativePath);
expect(
normalizeLegacyFileURLPathname('/C:/Users/me/100%20Free', 'win32'),
).toBe('C:\\Users\\me\\100%20Free');
normalizeLegacyFileURLPathname(legacyPathname, 'win32'),
).toBe(nativePath);
expect(
normalizeLegacyFileURLPathname('/repos/100%20Free', 'win32'),
).toBe('/repos/100%20Free');
Expand Down