test: stabilize sandbox browser audit timers · openclaw/openclaw@4365887
steipete
·
2026-05-30
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | | -import { describe, expect, it } from "vitest"; |
| 1 | +import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; |
2 | 2 | import type { OpenClawConfig } from "../config/config.js"; |
3 | 3 | import { collectSandboxBrowserHashLabelFindings } from "./audit-extra.async.js"; |
4 | 4 | import { collectSandboxDangerousConfigFindings } from "./audit-extra.sync.js"; |
@@ -25,6 +25,14 @@ function requireFinding(
|
25 | 25 | return finding; |
26 | 26 | } |
27 | 27 | |
| 28 | +beforeEach(() => { |
| 29 | +vi.useRealTimers(); |
| 30 | +}); |
| 31 | + |
| 32 | +afterEach(() => { |
| 33 | +vi.useRealTimers(); |
| 34 | +}); |
| 35 | + |
28 | 36 | describe("security audit sandbox browser findings", () => { |
29 | 37 | it("warns when sandbox browser containers have missing or stale hash labels", async () => { |
30 | 38 | const findings = await collectSandboxBrowserHashLabelFindings({ |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。