import { describe, it, expect } from 'vitest'; import { checkIntegrity, getAllTools, getAllApps } from '../src/lib/config/loader'; import { getEndpoints } from '../src/lib/catalog/loader'; describe('Config & Catalogue Reference Integrity (PRD ยง5.3 CFG-07, APP-01)', () => { it('has published tools and apps', () => { const tools = getAllTools(); const apps = getAllApps(); expect(tools.length).toBeGreaterThan(0); expect(apps.length).toBeGreaterThan(0); }); it('validates that every tool has a valid homeApp and endpointRef', () => { const { valid, errors } = checkIntegrity(); expect(errors).toEqual([]); expect(valid).toBe(true); }); it('has active endpoints normalised from catalogue', () => { const endpoints = getEndpoints(); expect(endpoints.length).toBeGreaterThan(0); }); });