From 14db3347ad03f6a4bc9f4fcffe51f111308f2ec4 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Fri, 14 Mar 2025 11:28:55 -0700 Subject: [PATCH] indexer tests --- core/indexing/CodebaseIndexer.test.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/indexing/CodebaseIndexer.test.ts b/core/indexing/CodebaseIndexer.test.ts index 517298597..cdcd61006 100644 --- a/core/indexing/CodebaseIndexer.test.ts +++ b/core/indexing/CodebaseIndexer.test.ts @@ -14,12 +14,12 @@ import { } from "../test/testDir.js"; import { getIndexSqlitePath } from "../util/paths.js"; +import { localPathToUri } from "../util/pathToUri.js"; import { CodebaseIndexer, PauseToken } from "./CodebaseIndexer.js"; import { getComputeDeleteAddRemove } from "./refreshIndex.js"; import { TestCodebaseIndex } from "./TestCodebaseIndex.js"; import { CodebaseIndex } from "./types.js"; -import { walkDir } from "./walkDir.js"; -import { localPathToUri } from "../util/pathToUri.js"; +import { walkDir, walkDirCache } from "./walkDir.js"; jest.useFakeTimers(); @@ -87,6 +87,10 @@ describe("CodebaseIndexer", () => { tearDownTestDir(); }); + afterEach(() => { + walkDirCache.invalidate(); + }); + async function refreshIndex() { const abortController = new AbortController(); const abortSignal = abortController.signal;