@@ -36,7 +36,9 @@ describe('PathUtils', () => {
3636 describe ( 'makeRelative' , ( ) => {
3737 it ( 'should create relative path between directories' , ( ) => {
3838 const result = PathUtils . makeRelative ( '/project/docs/file.md' , '/project' ) ;
39- expect ( result ) . toBe ( 'docs/file.md' ) ;
39+ // Normalize path separators for cross-platform compatibility
40+ const normalizedResult = result . replace ( / \\ / g, '/' ) ;
41+ expect ( normalizedResult ) . toBe ( 'docs/file.md' ) ;
4042 } ) ;
4143
4244 it ( 'should create relative path for sibling files' , ( ) => {
@@ -52,7 +54,9 @@ describe('PathUtils', () => {
5254 '/project/docs/source.md' ,
5355 '/project/moved/source.md'
5456 ) ;
55- expect ( result ) . toBe ( '../docs/target.md' ) ;
57+ // Normalize path separators for cross-platform compatibility
58+ const normalizedResult = result . replace ( / \\ / g, '/' ) ;
59+ expect ( normalizedResult ) . toBe ( '../docs/target.md' ) ;
5660 } ) ;
5761
5862 it ( 'should not change absolute paths' , ( ) => {
@@ -81,7 +85,9 @@ describe('PathUtils', () => {
8185 '/project/docs/source.md' ,
8286 '/project/moved/source.md'
8387 ) ;
84- expect ( result ) . toBe ( '../docs/config.md' ) ;
88+ // Normalize path separators for cross-platform compatibility
89+ const normalizedResult = result . replace ( / \\ / g, '/' ) ;
90+ expect ( normalizedResult ) . toBe ( '../docs/config.md' ) ;
8591 } ) ;
8692
8793 it ( 'should preserve absolute Claude import paths' , ( ) => {
@@ -131,12 +137,16 @@ describe('PathUtils', () => {
131137 it ( 'should find common base directory' , ( ) => {
132138 const paths = [ '/project/docs/file1.md' , '/project/docs/file2.md' , '/project/src/file3.md' ] ;
133139 const result = PathUtils . findCommonBase ( paths ) ;
134- expect ( result ) . toBe ( '/project' ) ;
140+ // Normalize path separators for cross-platform compatibility
141+ const normalizedResult = result . replace ( / \\ / g, '/' ) ;
142+ expect ( normalizedResult ) . toBe ( '/project' ) ;
135143 } ) ;
136144
137145 it ( 'should handle single path' , ( ) => {
138146 const result = PathUtils . findCommonBase ( [ '/project/docs/file.md' ] ) ;
139- expect ( result ) . toBe ( '/project/docs' ) ;
147+ // Normalize path separators for cross-platform compatibility
148+ const normalizedResult = result . replace ( / \\ / g, '/' ) ;
149+ expect ( normalizedResult ) . toBe ( '/project/docs' ) ;
140150 } ) ;
141151
142152 it ( 'should handle empty array' , ( ) => {
0 commit comments