From aab850668c99e1c39a55036069d9f4b06ca458f4 Mon Sep 17 00:00:00 2001 From: Bryant Chandler Date: Tue, 5 Aug 2025 23:33:27 -0700 Subject: feat(file-search): Add support for non-recursive file search (#5648) Co-authored-by: Jacob Richman --- packages/core/src/utils/filesearch/crawlCache.test.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'packages/core/src/utils/filesearch/crawlCache.test.ts') diff --git a/packages/core/src/utils/filesearch/crawlCache.test.ts b/packages/core/src/utils/filesearch/crawlCache.test.ts index 2feab61a..c8ca0df2 100644 --- a/packages/core/src/utils/filesearch/crawlCache.test.ts +++ b/packages/core/src/utils/filesearch/crawlCache.test.ts @@ -26,6 +26,17 @@ describe('CrawlCache', () => { const key2 = getCacheKey('/foo', 'baz'); expect(key1).not.toBe(key2); }); + + it('should generate a different hash for different maxDepth values', () => { + const key1 = getCacheKey('/foo', 'bar', 1); + const key2 = getCacheKey('/foo', 'bar', 2); + const key3 = getCacheKey('/foo', 'bar', undefined); + const key4 = getCacheKey('/foo', 'bar'); + expect(key1).not.toBe(key2); + expect(key1).not.toBe(key3); + expect(key2).not.toBe(key3); + expect(key3).toBe(key4); + }); }); describe('in-memory cache operations', () => { -- cgit v1.2.3