From 577cff3abf7cce4ff23ec320824635963c57a012 Mon Sep 17 00:00:00 2001 From: FoxxMD Date: Thu, 30 Apr 2026 17:20:27 +0000 Subject: [PATCH] test(player): Fix incorrect variable used for advanced timestamp --- src/backend/tests/source/source.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/tests/source/source.test.ts b/src/backend/tests/source/source.test.ts index 718ae1eb..8710c0cb 100644 --- a/src/backend/tests/source/source.test.ts +++ b/src/backend/tests/source/source.test.ts @@ -394,14 +394,14 @@ describe('Player Cleanup', function () { for(let i = 0; i < 5; i++) { position += 10; timeSince += 10; - MockDate.set(initialDate.add(position, 'seconds').toDate()); + MockDate.set(initialDate.add(timeSince, 'seconds').toDate()); await sleep(1); const advancedState = generatePlayerStateData({play: initialState.play, stateUpdatedAt: dayjs(), position, status: REPORTED_PLAYER_STATUSES.playing}); expect((await source.processRecentPlays([advancedState])).length).to.be.eq(0); } timeSince += 10; - MockDate.set(initialDate.add(position, 'seconds').toDate()); + MockDate.set(initialDate.add(timeSince, 'seconds').toDate()); await sleep(1); // new Play const advancedState = generatePlayerStateData({stateUpdatedAt: dayjs(), position: 0, status: REPORTED_PLAYER_STATUSES.playing}); -- 2.54.0