test: clarify nostr profile validation assertions · openclaw/openclaw@c0921c2
shakkernerd
·
2026-05-08
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -256,7 +256,7 @@ describe("validateProfile", () => {
|
256 | 256 | const result = validateProfile(profile); |
257 | 257 | |
258 | 258 | expect(result.valid).toBe(false); |
259 | | -expect(result.errors!.some((e) => e.includes("256"))).toBe(true); |
| 259 | +expect(result.errors).toEqual(expect.arrayContaining([expect.stringContaining("256")])); |
260 | 260 | }); |
261 | 261 | |
262 | 262 | it("rejects about exceeding 2000 characters", () => { |
@@ -267,7 +267,7 @@ describe("validateProfile", () => {
|
267 | 267 | const result = validateProfile(profile); |
268 | 268 | |
269 | 269 | expect(result.valid).toBe(false); |
270 | | -expect(result.errors!.some((e) => e.includes("2000"))).toBe(true); |
| 270 | +expect(result.errors).toEqual(expect.arrayContaining([expect.stringContaining("2000")])); |
271 | 271 | }); |
272 | 272 | |
273 | 273 | it("accepts empty profile", () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。