mirror of https://github.com/openclaw/openclaw.git
test: fix fresh infra type drift
This commit is contained in:
parent
75c7c169e1
commit
8dcee1f6b2
|
|
@ -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.",
|
||||
]);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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", () => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue