fix(qa): reject duplicate abort leak controls · openclaw/openclaw@e9b017d
vincentkoc
·
2026-06-23
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -53,6 +53,24 @@ describe("scripts/embedded-run-abort-leak", () => {
|
53 | 53 | expect(readdirSync(looseThresholdProbe.snapDir)).toEqual([]); |
54 | 54 | }); |
55 | 55 | |
| 56 | +it("rejects duplicate thresholds before writing heap snapshots", () => { |
| 57 | +const snapDir = makeTempRoot(); |
| 58 | +const result = runHarness([ |
| 59 | +"--snap-dir", |
| 60 | +snapDir, |
| 61 | +"--iters", |
| 62 | +"1", |
| 63 | +"--iters", |
| 64 | +"2", |
| 65 | +"--quiet", |
| 66 | +]); |
| 67 | + |
| 68 | +expect(result.status).toBe(2); |
| 69 | +expect(result.stdout).toBe(""); |
| 70 | +expect(result.stderr).toContain("error: --iters was provided more than once"); |
| 71 | +expect(readdirSync(snapDir)).toEqual([]); |
| 72 | +}); |
| 73 | + |
56 | 74 | it("rejects missing snapshot directories before writing heap snapshots", () => { |
57 | 75 | const result = runHarness(["--snap-dir", "--quiet", "--iters", "1", "--batches", "1"]); |
58 | 76 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。