tests/teaser: the stamp check back in the safe-margin test (typecheck)

This commit is contained in:
CRTkafa 2026-10-14 05:49:15 +08:00
parent 49557b4c74
commit 658807b219

View file

@ -293,13 +293,13 @@ describe('teaser: timing and format', () => {
expect(b.y + b.h, at).toBeLessThanOrEqual(T.FORMAT.h - my);
}
expect(j.rejectLayout!.at(-1)!.cards.length).toBe(T.REJECTS.length);
expect(j.rejectLayout!.some(f => f.stamp)).toBe(true);
});
test.skipIf(!existsSync(CHECKS))('no text overflows anywhere: every text node fits its element and its card, every card in frame, at every frame (animatic layout data)', () => {
const j = JSON.parse(readFileSync(CHECKS, 'utf8')) as { duration: number; textFrames?: number; textProblems?: unknown[] };
expect(j.duration).toBe(T.DURATION);
expect(j.textFrames).toBe(Math.round(T.DURATION * T.FPS));
expect(j.textProblems?.slice(0, 10)).toEqual([]);
expect(j.rejectLayout!.some(f => f.stamp)).toBe(true);
});
test('the picture darkens with the rejection and lifts on the drop', () => {
const r = T.SCENES.find(s => s.id === 'reject')!, b = T.SCENES.find(s => s.id === 'builds')!;