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",
|
displayPath: "~/.openclaw/config.json",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
kind: "oauth",
|
kind: "credentials",
|
||||||
sourcePath: "/oauth",
|
sourcePath: "/oauth",
|
||||||
archivePath: "archive/oauth",
|
archivePath: "archive/oauth",
|
||||||
displayPath: "~/.openclaw/oauth",
|
displayPath: "~/.openclaw/oauth",
|
||||||
|
|
@ -77,7 +77,7 @@ describe("formatBackupCreateSummary", () => {
|
||||||
"Backup archive: /tmp/openclaw-backup.tar.gz",
|
"Backup archive: /tmp/openclaw-backup.tar.gz",
|
||||||
"Included 2 paths:",
|
"Included 2 paths:",
|
||||||
"- config: ~/.openclaw/config.json",
|
"- config: ~/.openclaw/config.json",
|
||||||
"- oauth: ~/.openclaw/oauth",
|
"- credentials: ~/.openclaw/oauth",
|
||||||
"Dry run only; archive was not written.",
|
"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 () => {
|
it("removes the request, persists, and returns the dynamic id key", async () => {
|
||||||
const state = {
|
const state: { pendingById: Record<string, { accountId: string }> } = {
|
||||||
pendingById: {
|
pendingById: {
|
||||||
keep: { accountId: "keep-me" },
|
keep: { accountId: "keep-me" },
|
||||||
reject: { accountId: "acct-42" },
|
reject: { accountId: "acct-42" },
|
||||||
|
|
@ -33,7 +33,7 @@ describe("rejectPendingPairingRequest", () => {
|
||||||
idKey: "accountId",
|
idKey: "accountId",
|
||||||
loadState: async () => state,
|
loadState: async () => state,
|
||||||
persistState,
|
persistState,
|
||||||
getId: (pending) => pending.accountId,
|
getId: (pending: { accountId: string }) => pending.accountId,
|
||||||
}),
|
}),
|
||||||
).resolves.toEqual({
|
).resolves.toEqual({
|
||||||
requestId: "reject",
|
requestId: "reject",
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,9 @@ import { rawDataToString } from "./ws.js";
|
||||||
|
|
||||||
describe("rawDataToString", () => {
|
describe("rawDataToString", () => {
|
||||||
it("returns string input unchanged", () => {
|
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", () => {
|
it("decodes Buffer, Buffer[] and ArrayBuffer inputs", () => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue