Skip to content

Commit 90b18ed

Browse files
committed
Update unit tests
1 parent 1c5c2c1 commit 90b18ed

File tree

2 files changed

+1
-17
lines changed

2 files changed

+1
-17
lines changed

packages/core/src/test/codewhispererChat/tools/listDirectory.test.ts

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -55,20 +55,4 @@ describe('ListDirectory Tool', () => {
5555
assert.strictEqual(result.output.kind, 'text')
5656
assert.ok(result.output.content.length > 0)
5757
})
58-
59-
it('resolves relative path', async () => {
60-
await testFolder.mkdir('relTest')
61-
const filePath = path.join('relTest', 'relFile.txt')
62-
const content = 'Hello from a relative file!'
63-
await testFolder.write(filePath, content)
64-
65-
const relativePath = path.relative(process.cwd(), path.join(testFolder.path, filePath))
66-
67-
const listDirectory = new ListDirectory({ path: relativePath })
68-
await listDirectory.validate()
69-
const result = await listDirectory.invoke(process.stdout)
70-
71-
assert.strictEqual(result.output.kind, 'text')
72-
assert.strictEqual(result.output.content, content)
73-
})
7458
})

packages/core/src/test/codewhispererChat/tools/toolShared.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ describe('ToolUtils', function () {
147147
}
148148
mockListDirectory.invoke.resolves(expectedOutput)
149149

150-
const tool: Tool = { type: ToolType.ListDirectory, tool: mockFsRead as unknown as ListDirectory }
150+
const tool: Tool = { type: ToolType.ListDirectory, tool: mockListDirectory as unknown as ListDirectory }
151151
const result = await ToolUtils.invoke(tool, mockWritable as unknown as Writable)
152152

153153
assert.deepStrictEqual(result, expectedOutput)

0 commit comments

Comments
 (0)