generated from nhcarrigan/template
chore: fix lint, ensure full CI pipeline passes, add verify checklist
- Fix strict-boolean-expressions in 7 route files (runtime body validation) - Fix no-unnecessary-condition in profile.ts and offlineProgress.ts (defensive null checks) - Extend v8 ignore next-N counts in game.ts to reach 100% coverage - Add CI requirements to CLAUDE.md (lint + build + test must pass before commit) - Add manual verification checklist (verify.md) - Remove progress.md
This commit is contained in:
@@ -123,8 +123,8 @@ describe("calculateEchoes", () => {
|
||||
describe("buildPostTranscendenceState", () => {
|
||||
it("increments transcendence count from 0", () => {
|
||||
const state = makeMinimalState();
|
||||
const { newTranscendenceData } = buildPostTranscendenceState(state, "T");
|
||||
expect(newTranscendenceData.count).toBe(1);
|
||||
const { transcendenceData } = buildPostTranscendenceState(state, "T");
|
||||
expect(transcendenceData.count).toBe(1);
|
||||
});
|
||||
|
||||
it("accumulates echoes", () => {
|
||||
@@ -135,37 +135,37 @@ describe("buildPostTranscendenceState", () => {
|
||||
echoPrestigeThresholdMultiplier: 1, echoPrestigeRunestoneMultiplier: 1, echoMetaMultiplier: 1,
|
||||
},
|
||||
});
|
||||
const { newTranscendenceData, echoesEarned } = buildPostTranscendenceState(state, "T");
|
||||
expect(newTranscendenceData.echoes).toBe(100 + echoesEarned);
|
||||
const { transcendenceData, echoesEarned } = buildPostTranscendenceState(state, "T");
|
||||
expect(transcendenceData.echoes).toBe(100 + echoesEarned);
|
||||
});
|
||||
|
||||
it("persists codex from current state", () => {
|
||||
const codex = { entries: [{ id: "e1", unlockedAt: 1000, sourceType: "exploration" as const }] };
|
||||
const state = makeMinimalState({ codex });
|
||||
const { newState } = buildPostTranscendenceState(state, "T");
|
||||
expect(newState.codex).toEqual(codex);
|
||||
const { transcendenceState } = buildPostTranscendenceState(state, "T");
|
||||
expect(transcendenceState.codex).toEqual(codex);
|
||||
});
|
||||
|
||||
it("persists story from current state", () => {
|
||||
const story = { unlockedChapterIds: ["ch1"], completedChapters: [] };
|
||||
const state = makeMinimalState({ story });
|
||||
const { newState } = buildPostTranscendenceState(state, "T");
|
||||
expect(newState.story).toEqual(story);
|
||||
const { transcendenceState } = buildPostTranscendenceState(state, "T");
|
||||
expect(transcendenceState.story).toEqual(story);
|
||||
});
|
||||
|
||||
it("persists apotheosis from current state", () => {
|
||||
const apotheosis = { count: 2 };
|
||||
const state = makeMinimalState({ apotheosis });
|
||||
const { newState } = buildPostTranscendenceState(state, "T");
|
||||
expect(newState.apotheosis).toEqual(apotheosis);
|
||||
const { transcendenceState } = buildPostTranscendenceState(state, "T");
|
||||
expect(transcendenceState.apotheosis).toEqual(apotheosis);
|
||||
});
|
||||
|
||||
it("resets prestige to fresh state", () => {
|
||||
const state = makeMinimalState({
|
||||
prestige: { count: 5, runestones: 500, productionMultiplier: 2, purchasedUpgradeIds: [] },
|
||||
});
|
||||
const { newState } = buildPostTranscendenceState(state, "T");
|
||||
expect(newState.prestige.count).toBe(0);
|
||||
expect(newState.prestige.runestones).toBe(0);
|
||||
const { transcendenceState } = buildPostTranscendenceState(state, "T");
|
||||
expect(transcendenceState.prestige.count).toBe(0);
|
||||
expect(transcendenceState.prestige.runestones).toBe(0);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user