From e23276b4de732c89fb3bae72f5827fe5dafcd836 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Fri, 28 Nov 2025 19:55:52 -0800 Subject: [PATCH] fix: Phase 7 partial - fix test mock data errors (36 -> 34 errors) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed multiple test fixture type errors to match actual schema definitions. Changes: 1. Removed leftover optionalProps() call in users.ts (missed in Phase 2) 2. Fixed Character race field in entity.adapter.test.ts - Changed from object {race1, race2} to array [1, 2] - Matches entity.adapter.ts Character interface expectation 3. Added missing ULB stat fields to Weapon mocks in grid.adapter.test.ts - Added maxHpUlb and maxAtkUlb to hp/atk objects - Required by entities.ts Weapon interface Result: 36 → 34 errors (-2) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- src/lib/api/adapters/__tests__/entity.adapter.test.ts | 5 +---- src/lib/api/adapters/__tests__/grid.adapter.test.ts | 8 ++++---- src/lib/api/resources/users.ts | 2 +- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/lib/api/adapters/__tests__/entity.adapter.test.ts b/src/lib/api/adapters/__tests__/entity.adapter.test.ts index 0342b224..b4ce2200 100644 --- a/src/lib/api/adapters/__tests__/entity.adapter.test.ts +++ b/src/lib/api/adapters/__tests__/entity.adapter.test.ts @@ -61,10 +61,7 @@ describe('EntityAdapter', () => { special: false, recruits: null, gender: 0, - race: { - race1: 1, - race2: 2 - }, + race: [1, 2], proficiency: [1, 2], hp: { minHp: 150, diff --git a/src/lib/api/adapters/__tests__/grid.adapter.test.ts b/src/lib/api/adapters/__tests__/grid.adapter.test.ts index 54c2c992..753c1440 100644 --- a/src/lib/api/adapters/__tests__/grid.adapter.test.ts +++ b/src/lib/api/adapters/__tests__/grid.adapter.test.ts @@ -24,8 +24,8 @@ describe('GridAdapter', () => { series: 1, proficiency: 1, uncap: { flb: true, ulb: true, transcendence: false }, - hp: { minHp: 100, maxHp: 500, maxHpFlb: 600 }, - atk: { minAtk: 200, maxAtk: 1000, maxAtkFlb: 1200 } + hp: { minHp: 100, maxHp: 500, maxHpFlb: 600, maxHpUlb: 700 }, + atk: { minAtk: 200, maxAtk: 1000, maxAtkFlb: 1200, maxAtkUlb: 1400 } } const mockCharacter: Character = { @@ -54,8 +54,8 @@ describe('GridAdapter', () => { maxLevel: 150, series: 1, uncap: { flb: true, ulb: true, transcendence: false }, - hp: { minHp: 100, maxHp: 500, maxHpFlb: 600 }, - atk: { minAtk: 200, maxAtk: 1000, maxAtkFlb: 1200 } + hp: { minHp: 100, maxHp: 500, maxHpFlb: 600, maxHpUlb: 700 }, + atk: { minAtk: 200, maxAtk: 1000, maxAtkFlb: 1200, maxAtkUlb: 1400 } } const mockGridWeapon: GridWeapon = { diff --git a/src/lib/api/resources/users.ts b/src/lib/api/resources/users.ts index 93a3eb00..ac2d5a00 100644 --- a/src/lib/api/resources/users.ts +++ b/src/lib/api/resources/users.ts @@ -45,7 +45,7 @@ export const users = { updates.avatar = avatar } - const result = await userAdapter.updateProfile(optionalProps(updates)) + const result = await userAdapter.updateProfile(updates) return { id: result.id, username: result.username,