fix(cli): add required gpu prop to power-state test calls

trackRenderComplete requires `gpu: boolean`; the two new opt-out test
calls omitted it, failing Typecheck in CI. The fix already existed on the
stacked branch, so only this base branch was broken.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Vance Ingalls
2026-07-28 01:29:58 -07:00
co-authored by Claude Opus 5
parent b99c803898
commit cddc90ae37
+2 -2
View File
@@ -672,7 +672,7 @@ describe("power-state sampling respects the telemetry opt-out", () => {
});
it("samples power state for a tracked render", () => {
trackRenderComplete({ durationMs: 1, fps: 30, quality: "high", docker: false });
trackRenderComplete({ durationMs: 1, fps: 30, quality: "high", docker: false, gpu: false });
expect(getPowerState).toHaveBeenCalled();
const props = trackEvent.mock.calls.at(-1)?.[1] as Record<string, unknown>;
expect(props.on_battery).toBe(true);
@@ -685,7 +685,7 @@ describe("power-state sampling respects the telemetry opt-out", () => {
// guard — an opted-out install would otherwise pay two blocking
// subprocess spawns per render for an event that is then discarded.
shouldTrack.mockReturnValue(false);
trackRenderComplete({ durationMs: 1, fps: 30, quality: "high", docker: false });
trackRenderComplete({ durationMs: 1, fps: 30, quality: "high", docker: false, gpu: false });
expect(getPowerState).not.toHaveBeenCalled();
});
});