diff --git a/src/pages/GameDetail.points.test.jsx b/src/pages/GameDetail.points.test.jsx index 5d92ada..e609b98 100644 --- a/src/pages/GameDetail.points.test.jsx +++ b/src/pages/GameDetail.points.test.jsx @@ -38,6 +38,5 @@ it('checksThePointsAgainAfterTheAchievementRefresh', async () => { // The refresh stored the ending achievement: Core would settle the finish now (the old single call did). finishRefresh(json(200, {...game, achievementsStale: false, achievementsUnlocked: 5})); - await new Promise((resolve) => setTimeout(resolve, 50)); - expect(pointsCalls()).toBe(2); + await waitFor(() => expect(pointsCalls()).toBe(2)); });