mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 22:24:31 +00:00
test(agents): use lightweight clears in skills install e2e setup
This commit is contained in:
@@ -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: [] });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user