import { isMapConnectHost } from './map-connect-hosts'; import { OPENFREEMAP_DEFAULT_STYLE, OPENFREEMAP_HOST, RASTER_TILE_HOSTS } from './map-defaults'; import { describe, expect, it } from 'vitest'; describe('map defaults', () => { it('MAP-DEFAULTS-001: every shipped host reads in the grammar the operator list uses', () => { for (const host of [...RASTER_TILE_HOSTS, OPENFREEMAP_HOST]) expect(isMapConnectHost(host), host).toBe(true); }); it('MAP-DEFAULTS-002: lists each raster host once', () => { expect(new Set(RASTER_TILE_HOSTS).size).toBe(RASTER_TILE_HOSTS.length); }); it('MAP-DEFAULTS-003: the default style is OpenFreeMap Liberty on the shared host', () => { expect(OPENFREEMAP_DEFAULT_STYLE).toBe('https://tiles.openfreemap.org/styles/liberty'); expect(new URL(OPENFREEMAP_DEFAULT_STYLE).host).toBe(OPENFREEMAP_HOST); }); });