test: tighten hook mapping assertions

This commit is contained in:
Peter Steinberger
2026-05-11 13:19:39 +01:00
parent b48baece87
commit bf5202b056

View File

@@ -454,13 +454,10 @@ describe("gateway hooks helpers", () => {
},
} as OpenClawConfig);
expect(resolved.mappings).toMatchObject([
{
action: "wake",
matchPath: "wake",
sessionKey: "hook:wake:{{payload.id}}",
},
]);
expect(resolved.mappings).toHaveLength(1);
expect(resolved.mappings[0]?.action).toBe("wake");
expect(resolved.mappings[0]?.matchPath).toBe("wake");
expect(resolved.mappings[0]?.sessionKey).toBe("hook:wake:{{payload.id}}");
expect(resolved.sessionPolicy.allowedSessionKeyPrefixes).toBeUndefined();
});