test: clarify config infra accepted paths · openclaw/openclaw@5517b82
steipete
·
2026-05-08
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -156,7 +156,7 @@ describe("config io write", () => {
|
156 | 156 | }); |
157 | 157 | |
158 | 158 | await expect(io.readConfigFileSnapshot()).resolves.toMatchObject({ exists: true }); |
159 | | -expect(() => io.loadConfig()).not.toThrow(); |
| 159 | +expect(io.loadConfig()).toMatchObject({ gateway: { mode: "local" } }); |
160 | 160 | |
161 | 161 | expect(warn).toHaveBeenCalledWith( |
162 | 162 | expect.stringContaining( |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -142,7 +142,7 @@ describe("archive helpers", () => {
|
142 | 142 | }, |
143 | 143 | }); |
144 | 144 | |
145 | | -expect(() => checker({ path: "package", type: "Directory", size: 0 })).not.toThrow(); |
| 145 | +checker({ path: "package", type: "Directory", size: 0 }); |
146 | 146 | checker({ path: "package/a.txt", type: "File", size: 6 }); |
147 | 147 | expectTarPreflightError( |
148 | 148 | checker, |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -3,8 +3,8 @@ import { throwIfAborted } from "./abort.js";
|
3 | 3 | |
4 | 4 | describe("throwIfAborted", () => { |
5 | 5 | it("does nothing when the signal is missing or not aborted", () => { |
6 | | -expect(() => throwIfAborted()).not.toThrow(); |
7 | | -expect(() => throwIfAborted(new AbortController().signal)).not.toThrow(); |
| 6 | +expect(throwIfAborted()).toBeUndefined(); |
| 7 | +expect(throwIfAborted(new AbortController().signal)).toBeUndefined(); |
8 | 8 | }); |
9 | 9 | |
10 | 10 | it("throws a standard AbortError when the signal is aborted", () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。