MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / frames

Function frames

packages/cli/src/utils/motionAudit.test.ts:31–42  ·  view source on GitHub ↗

Build frames at the given times; `at(time)` supplies per-selector samples + liveness.

(
  times: number[],
  at: (time: number) => {
    data?: Record<string, FrameSample | null>;
    liveness?: Record<string, string>;
  },
)

Source from the content-addressed store, hash-verified

29
30/** Build frames at the given times; `at(time)` supplies per-selector samples + liveness. */
31function frames(
32 times: number[],
33 at: (time: number) => {
34 data?: Record<string, FrameSample | null>;
35 liveness?: Record<string, string>;
36 },
37): MotionFrame[] {
38 return times.map((time) => {
39 const { data = {}, liveness = {} } = at(time);
40 return { time, data, liveness: { "*": "x", ...liveness } };
41 });
42}
43
44describe("appearsBy", () => {
45 const assertion: MotionAssertion = { kind: "appearsBy", selector: "#h", bySec: 0.5 };

Callers 1

Calls 1

atFunction · 0.85

Tested by

no test coverage detected