test(agents): use lightweight clears in skills install e2e setup

This commit is contained in:
Peter Steinberger
2026-02-22 07:48:57 +00:00
parent 0511e28a27
commit b601f474f0
3 changed files with 9 additions and 9 deletions

View File

@@ -87,9 +87,9 @@ describe("skills-install fallback edge cases", () => {
}); });
beforeEach(async () => { beforeEach(async () => {
runCommandWithTimeoutMock.mockReset(); runCommandWithTimeoutMock.mockClear();
scanDirectoryWithSummaryMock.mockReset(); scanDirectoryWithSummaryMock.mockClear();
hasBinaryMock.mockReset(); hasBinaryMock.mockClear();
scanDirectoryWithSummaryMock.mockResolvedValue({ critical: 0, warn: 0, findings: [] }); scanDirectoryWithSummaryMock.mockResolvedValue({ critical: 0, warn: 0, findings: [] });
}); });

View File

@@ -89,9 +89,9 @@ vi.mock("../security/skill-scanner.js", async (importOriginal) => {
describe("installSkill download extraction safety (tar.bz2)", () => { describe("installSkill download extraction safety (tar.bz2)", () => {
beforeEach(() => { beforeEach(() => {
mocks.runCommand.mockReset(); mocks.runCommand.mockClear();
mocks.scanSummary.mockReset(); mocks.scanSummary.mockClear();
mocks.fetchGuard.mockReset(); mocks.fetchGuard.mockClear();
mocks.scanSummary.mockResolvedValue({ mocks.scanSummary.mockResolvedValue({
scannedFiles: 0, scannedFiles: 0,
critical: 0, critical: 0,

View File

@@ -70,9 +70,9 @@ async function installZipDownloadSkill(params: {
describe("installSkill download extraction safety", () => { describe("installSkill download extraction safety", () => {
beforeEach(() => { beforeEach(() => {
runCommandWithTimeoutMock.mockReset(); runCommandWithTimeoutMock.mockClear();
scanDirectoryWithSummaryMock.mockReset(); scanDirectoryWithSummaryMock.mockClear();
fetchWithSsrFGuardMock.mockReset(); fetchWithSsrFGuardMock.mockClear();
scanDirectoryWithSummaryMock.mockResolvedValue({ scanDirectoryWithSummaryMock.mockResolvedValue({
scannedFiles: 0, scannedFiles: 0,
critical: 0, critical: 0,