mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 11:21:23 +00:00
test: fix latest tsgo inference regressions in test suites
This commit is contained in:
committed by
Peter Steinberger
parent
d12817994f
commit
a186036814
@@ -23,6 +23,7 @@ import {
|
||||
resolveExecApprovalsPath,
|
||||
resolveExecApprovalsSocketPath,
|
||||
resolveSafeBins,
|
||||
type ExecApprovalsAgent,
|
||||
type ExecAllowlistEntry,
|
||||
type ExecApprovalsAgent,
|
||||
type ExecApprovalsFile,
|
||||
|
||||
@@ -4,6 +4,7 @@ import path from "node:path";
|
||||
import { afterAll, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { HEARTBEAT_PROMPT } from "../auto-reply/heartbeat.js";
|
||||
import * as replyModule from "../auto-reply/reply.js";
|
||||
import type { ReplyPayload } from "../auto-reply/types.js";
|
||||
import { whatsappOutbound } from "../channels/plugins/outbound/whatsapp.js";
|
||||
import type { OpenClawConfig } from "../config/config.js";
|
||||
import {
|
||||
@@ -20,6 +21,7 @@ import {
|
||||
type HeartbeatDeps,
|
||||
resolveHeartbeatIntervalMs,
|
||||
resolveHeartbeatPrompt,
|
||||
type HeartbeatDeps,
|
||||
runHeartbeatOnce,
|
||||
} from "./heartbeat-runner.js";
|
||||
import {
|
||||
|
||||
@@ -480,7 +480,14 @@ describe("buildOutboundResultEnvelope", () => {
|
||||
},
|
||||
];
|
||||
for (const testCase of cases) {
|
||||
expect(buildOutboundResultEnvelope(testCase.input), testCase.name).toEqual(testCase.expected);
|
||||
const input: Parameters<typeof buildOutboundResultEnvelope>[0] =
|
||||
"payloads" in testCase.input
|
||||
? {
|
||||
...testCase.input,
|
||||
payloads: testCase.input.payloads?.map((payload) => ({ ...payload })),
|
||||
}
|
||||
: testCase.input;
|
||||
expect(buildOutboundResultEnvelope(input), testCase.name).toEqual(testCase.expected);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user