From ff868f1105eb5da1faef4574061c839856c3a3d4 Mon Sep 17 00:00:00 2001 From: hided62 Date: Sat, 15 Aug 2026 04:31:10 +0000 Subject: [PATCH] test: make scenario 29 betting lifecycle repeatable --- ...nario29NationBettingLifecycle.integration.test.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tools/integration-tests/test/scenario29NationBettingLifecycle.integration.test.ts b/tools/integration-tests/test/scenario29NationBettingLifecycle.integration.test.ts index 73d799f5..e6475e32 100644 --- a/tools/integration-tests/test/scenario29NationBettingLifecycle.integration.test.ts +++ b/tools/integration-tests/test/scenario29NationBettingLifecycle.integration.test.ts @@ -86,9 +86,15 @@ integration('scenario 29 nation betting lifecycle', () => { }) ) ); - await prisma.inheritancePoint.createMany({ - data: userIds.map((userId) => ({ userId, key: 'previous', value: 1_000 })), - }); + await Promise.all( + userIds.map((userId) => + prisma.inheritancePoint.upsert({ + where: { userId_key: { userId, key: 'previous' } }, + create: { userId, key: 'previous', value: 1_000 }, + update: { value: 1_000 }, + }) + ) + ); }, }); if (!generalIds) {