mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-16 22:58:02 +00:00
test(studio): type nested timeline fixture broadly
This commit is contained in:
@@ -10,7 +10,9 @@ import { useTimelineLogicalRows } from "./useTimelineLogicalRows";
|
||||
|
||||
Object.assign(globalThis, { IS_REACT_ACT_ENVIRONMENT: true });
|
||||
|
||||
const tracks = Array.from(
|
||||
type TrackInput = readonly (readonly [number, readonly TimelineElement[]])[];
|
||||
|
||||
const tracks: TrackInput = Array.from(
|
||||
{ length: 1_000 },
|
||||
(_, track) =>
|
||||
[
|
||||
@@ -33,7 +35,7 @@ function Harness({
|
||||
inputTracks = tracks,
|
||||
}: {
|
||||
snapshots: Array<readonly TimelineLogicalRow[]>;
|
||||
inputTracks?: typeof tracks;
|
||||
inputTracks?: TrackInput;
|
||||
}) {
|
||||
usePlayerStore((state) => state.currentTime);
|
||||
const logicalRows = useTimelineLogicalRows({
|
||||
@@ -84,7 +86,7 @@ describe("useTimelineLogicalRows", () => {
|
||||
},
|
||||
],
|
||||
],
|
||||
] as const satisfies typeof tracks;
|
||||
] as const satisfies TrackInput;
|
||||
const host = document.createElement("div");
|
||||
const root = createRoot(host);
|
||||
const snapshots: Array<readonly TimelineLogicalRow[]> = [];
|
||||
|
||||
Reference in New Issue
Block a user