test: fix fresh infra type drift

This commit is contained in:
Peter Steinberger 2026-03-13 20:38:14 +00:00
parent 75c7c169e1
commit 8dcee1f6b2
3 changed files with 7 additions and 5 deletions

View File

@ -64,7 +64,7 @@ describe("formatBackupCreateSummary", () => {
displayPath: "~/.openclaw/config.json",
},
{
kind: "oauth",
kind: "credentials",
sourcePath: "/oauth",
archivePath: "archive/oauth",
displayPath: "~/.openclaw/oauth",
@ -77,7 +77,7 @@ describe("formatBackupCreateSummary", () => {
"Backup archive: /tmp/openclaw-backup.tar.gz",
"Included 2 paths:",
"- config: ~/.openclaw/config.json",
"- oauth: ~/.openclaw/oauth",
"- credentials: ~/.openclaw/oauth",
"Dry run only; archive was not written.",
]);
});

View File

@ -19,7 +19,7 @@ describe("rejectPendingPairingRequest", () => {
});
it("removes the request, persists, and returns the dynamic id key", async () => {
const state = {
const state: { pendingById: Record<string, { accountId: string }> } = {
pendingById: {
keep: { accountId: "keep-me" },
reject: { accountId: "acct-42" },
@ -33,7 +33,7 @@ describe("rejectPendingPairingRequest", () => {
idKey: "accountId",
loadState: async () => state,
persistState,
getId: (pending) => pending.accountId,
getId: (pending: { accountId: string }) => pending.accountId,
}),
).resolves.toEqual({
requestId: "reject",

View File

@ -4,7 +4,9 @@ import { rawDataToString } from "./ws.js";
describe("rawDataToString", () => {
it("returns string input unchanged", () => {
expect(rawDataToString("hello")).toBe("hello");
expect(rawDataToString("hello" as unknown as Parameters<typeof rawDataToString>[0])).toBe(
"hello",
);
});
it("decodes Buffer, Buffer[] and ArrayBuffer inputs", () => {