mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-11 15:20:43 +00:00
test: tighten command capture helper assertions
This commit is contained in:
@@ -47,7 +47,6 @@ describe("requireValidConfigSnapshot", () => {
|
||||
|
||||
function requireFirstLog(runtime: ReturnType<typeof createRuntime>): string {
|
||||
const [message] = runtime.log.mock.calls[0] ?? [];
|
||||
expect(message).toBeDefined();
|
||||
if (message === undefined) {
|
||||
throw new Error("expected runtime log message");
|
||||
}
|
||||
|
||||
@@ -84,7 +84,6 @@ async function runGatewayPrompt(params: {
|
||||
|
||||
const result = await promptGatewayConfig(params.baseConfig ?? {}, makeRuntime());
|
||||
const [call] = mocks.buildGatewayAuthConfig.mock.calls[0] ?? [];
|
||||
expect(call).toBeDefined();
|
||||
if (!call) {
|
||||
throw new Error("expected gateway auth config input");
|
||||
}
|
||||
|
||||
@@ -58,7 +58,6 @@ vi.mock("../gateway/call.js", () => ({
|
||||
|
||||
function requireFirstRuntimeLog(): string {
|
||||
const [message] = runtime.log.mock.calls[0] ?? [];
|
||||
expect(message).toBeDefined();
|
||||
if (message === undefined) {
|
||||
throw new Error("expected health command log output");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user