test: clear defined matcher scan · openclaw/openclaw@f309a40
steipete
·
2026-05-08
·
via Recent Commits to openclaw:main
File tree
extensions/discord/src/voice
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1182,10 +1182,11 @@ describe("DiscordVoiceManager", () => {
|
1182 | 1182 | player: { state: { status: string } }; |
1183 | 1183 | } |
1184 | 1184 | | undefined; |
1185 | | -expect(entry).toBeDefined(); |
1186 | | -if (entry) { |
1187 | | -entry.player.state.status = "playing"; |
| 1185 | +if (!entry) { |
| 1186 | +throw new Error("expected voice session for guild g1"); |
1188 | 1187 | } |
| 1188 | +expect(entry.player.state.status).toBe("idle"); |
| 1189 | +entry.player.state.status = "playing"; |
1189 | 1190 | |
1190 | 1191 | await ( |
1191 | 1192 | manager as unknown as { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -271,7 +271,8 @@ function expectCopilotProviderFromPlan(
|
271 | 271 | plan.action === "write" |
272 | 272 | ? (JSON.parse(plan.contents) as { providers?: Record<string, unknown> }) |
273 | 273 | : {}; |
274 | | -expect(parsed.providers?.["github-copilot"]).toBeDefined(); |
275 | | -expect(parsed.providers?.["github-copilot"]).not.toBeNull(); |
276 | | -return expect(parsed.providers?.["github-copilot"]); |
| 274 | +const provider = parsed.providers?.["github-copilot"]; |
| 275 | +expect(typeof provider).toBe("object"); |
| 276 | +expect(provider).not.toBeNull(); |
| 277 | +return expect(provider); |
277 | 278 | } |
| Original file line number | Diff line number | Diff line change |
|---|
@@ -201,7 +201,6 @@ describe("buildContextEngineMaintenanceRuntimeContext", () => {
|
201 | 201 | { entryId: "entry-1", message: { role: "user", content: "hi", timestamp: 1 } }, |
202 | 202 | ], |
203 | 203 | }); |
204 | | -expect(rewritePromise).toBeDefined(); |
205 | 204 | expect(rewritePromise?.then).toBeTypeOf("function"); |
206 | 205 | |
207 | 206 | await flushAsyncWork(); |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -552,6 +552,13 @@ describe("talk realtime gateway relay", () => {
|
552 | 552 | expect(() => createSession("conn-1")).toThrow( |
553 | 553 | "Too many active realtime relay sessions for this connection", |
554 | 554 | ); |
555 | | -expect(createSession("conn-2")).toBeDefined(); |
| 555 | +expect(createSession("conn-2")).toMatchObject({ |
| 556 | +provider: "relay-test", |
| 557 | +transport: "gateway-relay", |
| 558 | +audio: { |
| 559 | +inputEncoding: "pcm16", |
| 560 | +outputEncoding: "pcm16", |
| 561 | +}, |
| 562 | +}); |
556 | 563 | }); |
557 | 564 | }); |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。