Skip to content

Commit d166636

Browse files
author
Dante
committed
fix(test): avoid UI interaction in clear-cache test
- Changed test to directly test clearAllUncommittedLineCache - Removes dependency on vscode.window.showInformationMessage - Fixes timeout issue in CI environment
1 parent 6f9b97e commit d166636

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed
Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
import * as assert from "node:assert";
22

3-
import { clearAgeCache } from "@/commands/clear-cache";
3+
import { clearAllUncommittedLineCache } from "@/services/git-line-info";
44

55
suite("commands/clear-age-cache", () => {
6-
test("should execute without errors", async () => {
7-
// Just verify the command can be called without throwing
8-
await assert.doesNotReject(async () => await clearAgeCache(), "clearAgeCache should execute successfully");
6+
test("should clear uncommitted line cache", () => {
7+
// Test the actual cache clearing logic without UI
8+
assert.doesNotThrow(
9+
() => clearAllUncommittedLineCache(),
10+
"clearAllUncommittedLineCache should execute successfully",
11+
);
912
});
1013
});

0 commit comments

Comments
 (0)