Files
frontend-miniapp/tests/unit/OverviewMapLabels.spec.ts
lyf 9ea1bfab71
Some checks failed
CI / verify (push) Has been cancelled
同步 sgs-frontend-mobile 源码
2026-07-27 11:26:01 +08:00

20 lines
763 B
TypeScript

import { describe, expect, it } from 'vitest'
import { getOverviewMapLabelDefinition } from '@/domain/overviewMapLabels'
describe('overviewMapLabels', () => {
it('uses one public exterior label contract for model nodes and POIs', () => {
expect(getOverviewMapLabelDefinition({
name: '停车场入口02',
sourceObjectName: 'L1_停车场入口02'
})).toMatchObject({ id: 'overview-parking-exit', label: '停车场出口' })
expect(getOverviewMapLabelDefinition({
name: '红花路',
sourceObjectName: '室外_红花潭路'
})).toMatchObject({ id: 'overview-honghua-road', label: '红花潭路' })
expect(getOverviewMapLabelDefinition({ name: '楼梯', sourceObjectName: '室外楼梯01' }))
.toBeNull()
})
})