fix tests
This commit is contained in:
parent
0670852a15
commit
ee439faa38
2 changed files with 5 additions and 3 deletions
|
|
@ -25,7 +25,7 @@ test("resolveLsToolDirPath handles dot", () => {
|
|||
});
|
||||
|
||||
test("resolveLsToolDirPath handles dot relative", () => {
|
||||
expect(resolveLsToolDirPath("./hi")).toBe("/hi");
|
||||
expect(resolveLsToolDirPath("./hi")).toBe("./hi");
|
||||
});
|
||||
|
||||
test("resolveLsToolDirPath normalizes backslashes to forward slashes", () => {
|
||||
|
|
|
|||
|
|
@ -6,12 +6,13 @@ describe("viewSubdirectoryImpl", () => {
|
|||
it("should throw DirectoryNotFound when resolveInputPath returns null", async () => {
|
||||
const mockExtras = {
|
||||
ide: {
|
||||
fileExists: vi.fn().mockResolvedValue(true),
|
||||
fileExists: vi.fn().mockResolvedValue(false),
|
||||
getWorkspaceDirs: vi.fn().mockResolvedValue(["file:///workspace"]),
|
||||
},
|
||||
llm: {},
|
||||
};
|
||||
|
||||
// Mock resolveInputPath to return null (imported function would need to be mocked in actual test)
|
||||
// resolveInputPath will return null when path doesn't exist
|
||||
await expect(
|
||||
viewSubdirectoryImpl(
|
||||
{ directory_path: "/non/existent/path" },
|
||||
|
|
@ -24,6 +25,7 @@ describe("viewSubdirectoryImpl", () => {
|
|||
const mockExtras = {
|
||||
ide: {
|
||||
fileExists: vi.fn().mockResolvedValue(false), // Path doesn't exist
|
||||
getWorkspaceDirs: vi.fn().mockResolvedValue(["file:///workspace"]),
|
||||
},
|
||||
llm: {},
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue