Files
openclaw/src/gateway/channel-status-patches.test.ts
Tak Hoffman 8873e13f1e fix(gateway): stop stale-socket restarts before first event (#38643)
* fix(gateway): guard stale-socket restarts by event liveness

* fix(gateway): centralize connect-time liveness tracking

* fix(web): apply connected status patch atomically

* fix(gateway): require active socket for stale checks

* fix(gateway): ignore inherited stale event timestamps
2026-03-07 00:58:08 -06:00

13 lines
410 B
TypeScript

import { describe, expect, it } from "vitest";
import { createConnectedChannelStatusPatch } from "./channel-status-patches.js";
describe("createConnectedChannelStatusPatch", () => {
it("uses one timestamp for connected event-liveness state", () => {
expect(createConnectedChannelStatusPatch(1234)).toEqual({
connected: true,
lastConnectedAt: 1234,
lastEventAt: 1234,
});
});
});