Skip to content

Commit 07f1bdc

Browse files
test: add comprehensive ListFilesTool test suite (40 tests) (#213)
* test: add comprehensive ListFilesTool test suite (40 tests) Add full test coverage for ListFilesTool including: - Parameter validation (missing path) - Basic and recursive file listing - Approval flow and user cancellation - Relative and absolute path resolution - Error handling (nonexistent dirs, permission denied) - Partial message streaming (handlePartial) - Edge cases (empty dirs, large file sets, root/dot paths) - Singleton instance verification - RooIgnore/RooProtected controller passthrough Fixes cross-platform compatibility for Windows CI by using path.resolve() instead of hardcoded Unix paths, and removing the unnecessary path module mock that caused failures on Windows. Closes #209 * test(listFiles): assert consecutiveMistakeCount value on validation+error path Addresses CodeRabbit review: the 'no reset on error' test never asserted the counter, so it would pass even if the reset behavior regressed. Renamed to reflect actual behavior (validation success resets to 0 before listFiles throws) and added the missing assertion. 40 tests pass. * test(listFilesTool): cover case-insensitive recursive flag instead of duplicate * Update src/core/tools/__tests__/listFilesTool.spec.ts --------- Co-authored-by: Armando Vaquera <263793884+proyectoauraorg@users.noreply.github.com> Co-authored-by: edelauna <54631123+edelauna@users.noreply.github.com>
1 parent e27a42b commit 07f1bdc

1 file changed

Lines changed: 594 additions & 0 deletions

File tree

0 commit comments

Comments
 (0)