Skip to content

Commit 2b33a47

Browse files
author
이종경
committed
fix: add test for handling missing drive letter in Windows path in toCleanPath
1 parent 610e0b1 commit 2b33a47

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/create/tests/file-helper.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ describe('toCleanPath', () => {
4444
toCleanPath('C:\\Projects\\my-app\\src\\file.ts', 'C:/Projects/my-app'),
4545
).toBe('src/file.ts')
4646
})
47+
48+
it('should handle missing drive letter in path against Windows base', () => {
49+
expect(
50+
toCleanPath('/Users/me/my-app/src/file.ts', 'C:\\Users\\me\\my-app'),
51+
).toBe('src/file.ts')
52+
})
4753
})
4854

4955
describe('relativePath', () => {

0 commit comments

Comments
 (0)