Skip to content

Commit 4365887

Browse files
committed
test: stabilize sandbox browser audit timers
1 parent bd04d2d commit 4365887

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

src/security/audit-sandbox-browser.test.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { describe, expect, it } from "vitest";
1+
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
22
import type { OpenClawConfig } from "../config/config.js";
33
import { collectSandboxBrowserHashLabelFindings } from "./audit-extra.async.js";
44
import { collectSandboxDangerousConfigFindings } from "./audit-extra.sync.js";
@@ -25,6 +25,14 @@ function requireFinding(
2525
return finding;
2626
}
2727

28+
beforeEach(() => {
29+
vi.useRealTimers();
30+
});
31+
32+
afterEach(() => {
33+
vi.useRealTimers();
34+
});
35+
2836
describe("security audit sandbox browser findings", () => {
2937
it("warns when sandbox browser containers have missing or stale hash labels", async () => {
3038
const findings = await collectSandboxBrowserHashLabelFindings({

0 commit comments

Comments
 (0)