mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-26 12:26:38 -06:00
test(skills): remove scanner cache reset seam (#126199)
This commit is contained in:
committed by
GitHub
parent
3550b174e9
commit
95ac5b27fa
@@ -3,14 +3,8 @@ import fsSync from "node:fs";
|
||||
import fs from "node:fs/promises";
|
||||
import os from "node:os";
|
||||
import path from "node:path";
|
||||
import { afterAll, afterEach, describe, expect, it, vi } from "vitest";
|
||||
import {
|
||||
clearSkillScanCacheForTest,
|
||||
isScannable,
|
||||
scanDirectoryWithSummary,
|
||||
scanSkillContent,
|
||||
scanSource,
|
||||
} from "./scanner.js";
|
||||
import { afterAll, describe, expect, it, vi } from "vitest";
|
||||
import { isScannable, scanDirectoryWithSummary, scanSkillContent, scanSource } from "./scanner.js";
|
||||
import type { SkillScanOptions } from "./scanner.js";
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@@ -140,10 +134,6 @@ type SummaryCase = {
|
||||
};
|
||||
};
|
||||
|
||||
afterEach(() => {
|
||||
clearSkillScanCacheForTest();
|
||||
});
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// scanSource
|
||||
// ---------------------------------------------------------------------------
|
||||
@@ -815,7 +805,6 @@ describe("scanDirectoryWithSummary", () => {
|
||||
testCase.expected.expectedPresent,
|
||||
);
|
||||
}
|
||||
clearSkillScanCacheForTest();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -124,11 +124,6 @@ function setCachedDirEntries(dirPath: string, entry: DirEntryCacheEntry): void {
|
||||
DIR_ENTRY_CACHE.set(dirPath, entry);
|
||||
}
|
||||
|
||||
export function clearSkillScanCacheForTest(): void {
|
||||
FILE_SCAN_CACHE.clear();
|
||||
DIR_ENTRY_CACHE.clear();
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Rule definitions
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user