1import test from 'node:test';2import assert from 'node:assert/strict';3import { giftMotionFrame } from '../src/scenes/gift.js';4import { workshopMotionFrame } from '../src/scenes/workshop.js';56test('Gift card slams from above and falls 16px during exit', () => {7 const start = giftMotionFrame({ phase: 'opening', entryProgress: 0 });8 const landed = giftMotionFrame({ phase: 'opening', entryProgress: 1 });9 const exit = giftMotionFrame({ phase: 'exiting', exitProgress: 1 });10 assert.ok(start.offsetY < -40);11 assert.ok(Math.abs(landed.offsetY) < 0.001);12 assert.equal(exit.offsetY, 16);13 assert.ok(exit.alpha < 1);14});1516test('Workshop shell and list ease in, then drift down on exit', () => {17 const start = workshopMotionFrame({ phase: 'opening', entryProgress: 0 });18 const landed = workshopMotionFrame({ phase: 'opening', entryProgress: 1 });19 const exit = workshopMotionFrame({ phase: 'exiting', exitProgress: 1 });20 assert.equal(start.offsetY, -18);21 assert.ok(Math.abs(landed.offsetY) < 0.001);22 assert.equal(exit.offsetY, 16);23 assert.ok(exit.alpha < 1);24});2526test('reduced motion settles both menu scenes immediately', () => {27 assert.deepEqual(giftMotionFrame({ phase: 'opening', entryProgress: 0 }, true), { offsetY: 0, alpha: 1 });28 assert.deepEqual(workshopMotionFrame({ phase: 'exiting', exitProgress: 0.5 }, true), { offsetY: 0, alpha: 1 });29});