This commit is contained in:
19
tests/unit/OverviewMapLabels.spec.ts
Normal file
19
tests/unit/OverviewMapLabels.spec.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
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()
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user