From 4934a9e35720d7a354f1ee9c2dc9afffed597f3e Mon Sep 17 00:00:00 2001 From: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com> Date: Wed, 28 May 2025 16:28:06 -0500 Subject: [PATCH] Fix tween chain mock --- test/testUtils/gameWrapper.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/test/testUtils/gameWrapper.ts b/test/testUtils/gameWrapper.ts index 9264b68d421..21c4c7ecd6b 100644 --- a/test/testUtils/gameWrapper.ts +++ b/test/testUtils/gameWrapper.ts @@ -124,13 +124,17 @@ export default class GameWrapper { this.scene.tweens = { add: data => { - if (data.onComplete) { - data.onComplete(); - } + // TODO: our mock of `add` should have the same signature as the real one, which returns the tween + data.onComplete?.(); }, getTweensOf: () => [], killTweensOf: () => [], - chain: () => null, + + chain: data => { + // TODO: our mock of `chain` should have the same signature as the real one, which returns the chain + data?.tweens?.forEach(tween => tween.onComplete?.()); + data.onComplete?.(); + }, addCounter: data => { if (data.onComplete) { data.onComplete();