test: tighten irc discord string assertions · openclaw/openclaw@a027444
steipete
·
2026-05-08
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -52,7 +52,7 @@ describe("ensureOggOpus", () => {
|
52 | 52 | }); |
53 | 53 | |
54 | 54 | function expectStagedFfmpegOutput(ffmpegOutputPath: string | undefined, finalPath: string) { |
55 | | -expect(ffmpegOutputPath).toEqual(expect.any(String)); |
| 55 | +expect(ffmpegOutputPath).toBeTypeOf("string"); |
56 | 56 | if (typeof ffmpegOutputPath !== "string") { |
57 | 57 | throw new Error("missing ffmpeg output path"); |
58 | 58 | } |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -132,7 +132,7 @@ describe("sendMessageIrc cfg threading", () => {
|
132 | 132 | direction: "outbound", |
133 | 133 | }); |
134 | 134 | expect(result.target).toBe("#room"); |
135 | | -expect(result.messageId).toEqual(expect.any(String)); |
| 135 | +expect(result.messageId).toBeTypeOf("string"); |
136 | 136 | expect(result.messageId.length).toBeGreaterThan(0); |
137 | 137 | expect(result.receipt).toMatchObject({ |
138 | 138 | primaryPlatformMessageId: "irc-msg-1", |
@@ -191,7 +191,7 @@ describe("sendMessageIrc cfg threading", () => {
|
191 | 191 | expect(hoisted.loadConfig).not.toHaveBeenCalled(); |
192 | 192 | expect(client.sendPrivmsg).toHaveBeenCalledWith("#room", "hello"); |
193 | 193 | expect(result.target).toBe("#room"); |
194 | | -expect(result.messageId).toEqual(expect.any(String)); |
| 194 | +expect(result.messageId).toBeTypeOf("string"); |
195 | 195 | expect(result.messageId.length).toBeGreaterThan(0); |
196 | 196 | }); |
197 | 197 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。