fix: apply crystal multiplier to boss rewards, steepen prestige threshold, fix stale upgrade race condition, and fix companion format display
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 1m6s
CI / Lint, Build & Test (pull_request) Failing after 1m13s

Closes #221
Closes #222
Closes #201
Closes #213
This commit is contained in:
2026-04-06 13:22:15 -07:00
committed by Naomi Carrigan
parent 1c10df88fb
commit 69579e166a
10 changed files with 131 additions and 55 deletions
+10
View File
@@ -81,6 +81,16 @@ describe("prestige route", () => {
expect(res.status).toBe(400);
});
it("returns 400 with echoPrestigeThresholdMultiplier applied when transcendence is present", async () => {
const state = makeState({
player: { discordId: DISCORD_ID, username: "u", discriminator: "0", avatar: null, totalGoldEarned: 500_000, totalClicks: 0, characterName: "T" },
transcendence: { count: 1, echoes: 0, purchasedUpgradeIds: [], echoIncomeMultiplier: 1, echoCombatMultiplier: 1, echoPrestigeThresholdMultiplier: 2, echoPrestigeRunestoneMultiplier: 1, echoMetaMultiplier: 1 },
});
vi.mocked(prisma.gameState.findUnique).mockResolvedValueOnce({ state } as never);
const res = await post("");
expect(res.status).toBe(400);
});
it("returns runestones on successful prestige", async () => {
const state = makeState();
vi.mocked(prisma.gameState.findUnique).mockResolvedValueOnce({ state, updatedAt: 0 } as never);