Gate live feed staleness and isolate Next dev artifacts
- delay stale status for paused live feeds before surfacing disconnects - keep `next dev` output separate from production build artifacts - add coverage for the new live-feed stale threshold
This commit is contained in:
parent
4368d6db4c
commit
1161e37ef5
8 changed files with 130 additions and 6 deletions
|
|
@ -185,6 +185,11 @@ describe("live tape pausable helpers", () => {
|
|||
expect(getLiveFeedStatus("disconnected", 1000, 500, 1601)).toBe("disconnected");
|
||||
});
|
||||
|
||||
it("waits for an additional behind-delay before surfacing stale", () => {
|
||||
expect(getLiveFeedStatus("connected", 1000, 500, 2000, 15_000)).toBe("connected");
|
||||
expect(getLiveFeedStatus("connected", 1000, 500, 16_501, 15_000)).toBe("stale");
|
||||
});
|
||||
|
||||
it("keeps visible history even when live status is stale", () => {
|
||||
const projected = projectPausableTapeState([makeItem("stale", 7, 1000)], "stale", 2000);
|
||||
expect(projected.items.map((item) => item.trace_id)).toEqual(["stale"]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue