mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-01 19:42:03 +00:00
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:
co-authored by
Claude Opus 5
parent
b99c803898
commit
cddc90ae37
@@ -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();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user