Skip to content

Commit 224eba4

Browse files
sorccuclaude
andcommitted
fix: use platform-appropriate paths in getAutoIncludes tests
path.resolve ensures basePath is valid on Windows where /project is not treated as an absolute path. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent a714214 commit 224eba4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/cli/src/services/__tests__/util.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ describe('util', () => {
3232
})
3333

3434
describe('getAutoIncludes()', () => {
35-
const basePath = '/project'
35+
const basePath = path.resolve('/project')
3636
const makePm = (name: string): PackageManager => ({
3737
name,
3838
representativeLockfile: undefined,
@@ -74,7 +74,7 @@ describe('util', () => {
7474
})
7575

7676
it('should skip when user includes absolute patches path', () => {
77-
const result = getAutoIncludes(basePath, makePm('pnpm'), ['/project/patches/**'])
77+
const result = getAutoIncludes(basePath, makePm('pnpm'), [path.join(basePath, 'patches/**')])
7878
expect(result).toEqual([])
7979
})
8080
})

0 commit comments

Comments
 (0)