mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 13:21:25 +00:00
chore: Fix types in tests 11/N.
This commit is contained in:
@@ -92,7 +92,7 @@ describe("hooks mapping", () => {
|
||||
],
|
||||
});
|
||||
expect(result?.ok).toBe(true);
|
||||
if (result?.ok) {
|
||||
if (result?.ok && result.action?.kind === "agent") {
|
||||
expect(result.action.kind).toBe("agent");
|
||||
expect(result.action.message).toBe("Subject: Hello");
|
||||
}
|
||||
@@ -146,11 +146,9 @@ describe("hooks mapping", () => {
|
||||
});
|
||||
|
||||
expect(result?.ok).toBe(true);
|
||||
if (result?.ok) {
|
||||
if (result?.ok && result.action?.kind === "wake") {
|
||||
expect(result.action.kind).toBe("wake");
|
||||
if (result.action.kind === "wake") {
|
||||
expect(result.action.text).toBe("Ping Ada");
|
||||
}
|
||||
expect(result.action.text).toBe("Ping Ada");
|
||||
}
|
||||
});
|
||||
|
||||
@@ -259,7 +257,7 @@ describe("hooks mapping", () => {
|
||||
],
|
||||
});
|
||||
expect(result?.ok).toBe(true);
|
||||
if (result?.ok) {
|
||||
if (result?.ok && result.action?.kind === "agent") {
|
||||
expect(result.action.kind).toBe("agent");
|
||||
expect(result.action.message).toBe("Override subject: Hello");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user