Skip to content

Commit 1c76cd2

Browse files
committed
test(core): pin the seek re-render from below in the runtime seek script
1 parent afc7bf8 commit 1c76cd2

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

‎packages/core/scripts/test-hyperframe-runtime-seek.ts‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,12 @@ function testGsapAdapterPreservesTotalTime(): void {
100100
calls,
101101
[
102102
{ method: "pause" },
103-
// Nudge to force GSAP 3.x dirty state before the real seek
104-
{ method: "totalTime", time: seekTime + 0.001, suppressEvents: true },
105103
{ method: "totalTime", time: seekTime, suppressEvents: false },
104+
// Silent re-render arriving from below, so same-time steps apply in authored order
105+
{ method: "totalTime", time: seekTime - 0.001, suppressEvents: true },
106+
{ method: "totalTime", time: seekTime, suppressEvents: true },
106107
],
107-
"GSAP adapter should nudge then seek via totalTime() (not downgrade to seek())",
108+
"GSAP adapter should seek via totalTime() then re-render from just below",
108109
);
109110
}
110111

‎packages/core/src/runtime/adapters/gsap.steps.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ describe("gsap adapter on a step", () => {
2929
expect(film.shown()).toEqual([false, true, false]);
3030
});
3131

32-
it("fires a call on the step once", () => {
32+
it("fires a call on the step once when seeking onto it twice", () => {
3333
const film = steppedFilm();
3434
film.adapter.seek({ time: 2.5 });
3535
film.adapter.seek({ time: 2.5 });

0 commit comments

Comments
 (0)