feat(health): service registry loader + seed config (fresh titles)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
17
tests/health/registry.test.js
Normal file
17
tests/health/registry.test.js
Normal file
@@ -0,0 +1,17 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { load, grouped, iconSlug, CATEGORY_ORDER } from '../../lib/health/registry.js';
|
||||
|
||||
describe('registry', () => {
|
||||
it('loads the seed config', () => { expect(load().length).toBeGreaterThan(0); });
|
||||
it('derives an icon slug from icon or name', () => {
|
||||
expect(iconSlug({ name: 'Open WebUI' })).toBe('open-webui');
|
||||
expect(iconSlug({ name: 'Plex', icon: 'plex' })).toBe('plex');
|
||||
});
|
||||
it('groups in agents→infrastructure→media order', () => {
|
||||
const g = grouped(load());
|
||||
const cats = g.map(x => x.category);
|
||||
const ai = cats.indexOf('agents'), mi = cats.indexOf('media');
|
||||
expect(ai).toBeLessThan(mi);
|
||||
expect(CATEGORY_ORDER[0]).toBe('agents');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user