Skip to content

Commit e7dea2b

Browse files
committed
fix: properly mock os module in custom-system-prompt test
- Add default export to os module mock to fix vitest error - This resolves the test failure on both Ubuntu and Windows CI - The issue was not related to toPosix but to improper os module mocking
1 parent 72b8c6f commit e7dea2b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/core/prompts/__tests__/custom-system-prompt.spec.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ vi.mock("../../../services/code-index/manager", () => ({
4949
}))
5050

5151
vi.mock("os", () => ({
52+
default: {
53+
type: vi.fn().mockReturnValue("Windows_NT"),
54+
homedir: vi.fn().mockReturnValue("/home/test"),
55+
},
5256
type: vi.fn().mockReturnValue("Windows_NT"),
5357
homedir: vi.fn().mockReturnValue("/home/test"),
5458
}))

0 commit comments

Comments
 (0)