import { readFileSync } from 'node:fs' import { describe, expect, it } from 'vitest' const source = readFileSync(new URL('./MapApp.vue', import.meta.url), 'utf8') describe('MapApp interaction contract', () => { it('uses Sky UI controls and the central EasyShare store', () => { expect(source).not.toContain("from 'konsta/vue'") expect(source).toContain(' { expect(source).toContain('minimumCoverZoom(metrics, baseMinZoom)') expect(source).toContain('clampMapPan(nextPan, nextZoom, metrics)') expect(source).toContain('zoomPanAtPoint(') expect(source).not.toContain("width: 'max(120%, 120vh)'") }) it('allows the marker crosshair to be placed by tapping the map', () => { expect(source).toContain('placementPoint.value = viewportPoint({') expect(source).toContain(':style="placementCrosshairStyle"') expect(source).toContain('clientPointToMapPercent(') }) })