mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 13:50:49 +00:00
test(extensions): fix lint-clean test assertions
This commit is contained in:
@@ -153,20 +153,20 @@ describe("createQaScenarioRuntimeApi", () => {
|
||||
expect(api.getTransportSnapshot()).toEqual(state.getSnapshot());
|
||||
expect(api.imageUnderstandingPngBase64).toBe("png-small");
|
||||
|
||||
const inbound = await api.injectInboundMessage({
|
||||
const inbound = api.injectInboundMessage({
|
||||
accountId: "qa-channel",
|
||||
conversation: { id: "qa-operator", kind: "direct" },
|
||||
senderId: "qa-operator",
|
||||
text: "hello",
|
||||
});
|
||||
const outbound = await api.injectOutboundMessage({
|
||||
const outbound = api.injectOutboundMessage({
|
||||
accountId: "qa-channel",
|
||||
to: "dm:qa-operator",
|
||||
text: "hi",
|
||||
});
|
||||
expect(inbound.id).toBeTruthy();
|
||||
expect(outbound.id).toBeTruthy();
|
||||
await api.readTransportMessage({ accountId: "qa-channel", messageId: outbound.id });
|
||||
api.readTransportMessage({ accountId: "qa-channel", messageId: outbound.id });
|
||||
await api.reset();
|
||||
await api.resetBus();
|
||||
await api.resetTransport();
|
||||
|
||||
@@ -152,7 +152,9 @@ describe("uploadFile memex upload hardening", () => {
|
||||
maxRedirects: 0,
|
||||
});
|
||||
const firstCall = mockGuardedFetch.mock.calls[0]?.[0];
|
||||
const firstBody = JSON.parse(String(firstCall?.init?.body)) as Record<string, unknown>;
|
||||
const firstBodyRaw = firstCall?.init?.body;
|
||||
expect(typeof firstBodyRaw).toBe("string");
|
||||
const firstBody = JSON.parse(firstBodyRaw as string) as Record<string, unknown>;
|
||||
expect(firstBody).toMatchObject({
|
||||
token: "genuine-secret",
|
||||
contentLength: 11,
|
||||
|
||||
@@ -75,7 +75,7 @@ function setup(config: Record<string, unknown>): Registered {
|
||||
registerService: () => {},
|
||||
resolvePath: (p: string) => p,
|
||||
});
|
||||
void plugin.register(api);
|
||||
plugin.register(api);
|
||||
return { methods, tools };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user