chore: Fix types in tests 11/N.

This commit is contained in:
cpojer
2026-02-17 11:17:32 +09:00
parent 058eb85762
commit e02feaff83
6 changed files with 87 additions and 86 deletions

View File

@@ -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");
}