import { describe, expect, it } from 'vitest'; import { PLANE_TYPES, STARTER_MODEL } from './catalog'; // v0.28.0 (ISS-047) — catalog sanity: the progression ladder must stay well-formed as types are added. describe('PLANE_TYPES', () => { it('every entry has positive specs and a unique id', () => { const ids = Object.keys(PLANE_TYPES); expect(new Set(ids).size).toBe(ids.length); for (const t of Object.values(PLANE_TYPES)) { expect(t.id, `${t.name} id`).toBeTruthy(); expect(t.price, `${t.name} price`).toBeGreaterThan(0); expect(t.maxFuel, `${t.name} maxFuel`).toBeGreaterThan(0); expect(t.burnPerKm, `${t.name} burnPerKm`).toBeGreaterThan(0); expect(t.emptyWeightKg, `${t.name} emptyWeightKg`).toBeGreaterThan(0); expect(t.speedKmh, `${t.name} speedKmh`).toBeGreaterThan(0); expect(t.maxPayloadKg, `${t.name} maxPayloadKg`).toBeGreaterThan(0); } }); it('atr72 is the starter model', () => { expect(STARTER_MODEL).toBe('atr72'); expect(PLANE_TYPES[STARTER_MODEL]).toBeDefined(); }); });