import { describe, expect, it } from 'vitest'; import { TREK_API_SOURCES, trekApiAddressFeatures, trekApiFacts, trekApiFields, trekApiRoutingFeatures, } from './trekApiModel'; // FE-TREKAPIMODEL-001 to FE-TREKAPIMODEL-004 const t = (key: string) => `<${key}>`; describe('trekApiModel', () => { it('FE-TREKAPIMODEL-001: lists the ten result fields in their order, translated', () => { expect(trekApiFields(t)).toEqual([ '', '', '', '', '', '', '', '', '', '', ]); }); it('FE-TREKAPIMODEL-002: leads with the three services, then the terms, each with a glyph', () => { const facts = trekApiFacts(t); expect(facts.map((f) => f.text)).toEqual([ '', '', '', '', '', '', ]); for (const f of facts) expect(f.Icon).toBeTruthy(); }); it('FE-TREKAPIMODEL-003: names the data sources untranslated', () => { expect(TREK_API_SOURCES).toEqual([ 'Overture Maps Foundation', 'OpenStreetMap', 'Wikivoyage', 'Wikimedia', 'Mapzen Terrain Tiles', ]); }); it('FE-TREKAPIMODEL-004: lists what the address search and the routing answer', () => { expect(trekApiAddressFeatures(t)).toEqual([ '', '', '', '', ]); expect(trekApiRoutingFeatures(t)).toEqual([ '', '', '', '', '', ]); }); });