Skip to content

Commit 1e747fc

Browse files
committed
Fix unit test
1 parent afd3df6 commit 1e747fc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@ describe('ListDirectory Tool', () => {
2929
const result = await listDirectory.invoke(process.stdout)
3030

3131
const lines = result.output.content.split('\n')
32-
const hasFileA = lines.some((line: string | string[]) => line.includes('- ') && line.includes('fileA.txt'))
33-
const hasSubfolder = lines.some((line: string | string[]) => line.includes('d ') && line.includes('subfolder'))
32+
const hasFileA = lines.some((line: string | string[]) => line.includes('[FILE] ') && line.includes('fileA.txt'))
33+
const hasSubfolder = lines.some(
34+
(line: string | string[]) => line.includes('[DIR] ') && line.includes('subfolder')
35+
)
3436

3537
assert.ok(hasFileA, 'Should list fileA.txt in the directory output')
3638
assert.ok(hasSubfolder, 'Should list the subfolder in the directory output')

0 commit comments

Comments
 (0)