teqo-backup/tests/unit/municipalityGeographyParts.unit.spec.ts
Francisco Ignácio Fontoura Solla 4806c417c8 Engineering Pass 3: consolidate patterns and lock them with guards.
Fold duplicated campanha access, loaders, list/filter/form shells, and scripts into shared modules; reorganize utilities by domain; stabilize e2e; and document prevention-first audit workflow so the same smells cannot creep back in.
2026-07-29 06:11:29 -03:00

25 lines
737 B
TypeScript

import { describe, expect, it } from 'vitest'
import { municipalityGeographyParts } from '@/utilities/municipality/municipalityLabels'
describe('municipalityGeographyParts', () => {
it('returns only the region for whole municipalities', () => {
expect(
municipalityGeographyParts({
region: 'Chapada Diamantina',
kind: 'municipio',
zoneNumber: null,
}),
).toEqual({ region: 'Chapada Diamantina', zoneSuffix: null })
})
it('keeps the ZE suffix outside the linkable region name', () => {
expect(
municipalityGeographyParts({
region: 'Salvador',
kind: 'zona',
zoneNumber: 5,
}),
).toEqual({ region: 'Salvador', zoneSuffix: '· ZE 5' })
})
})