mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-14 08:53:11 +00:00
Replaces the post-municipality stub with a full wizard: tile grid, contact+leadership writes, entryAction skip, and Continuar after save.
17 lines
638 B
TypeScript
17 lines
638 B
TypeScript
import { describe, expect, it } from 'vitest'
|
|
|
|
import { truncateNameAtWordBoundary } from '@/lib/leadershipNameTruncate'
|
|
|
|
describe('truncateNameAtWordBoundary', () => {
|
|
it('returns the full name when it fits', () => {
|
|
expect(truncateNameAtWordBoundary('Maria Silva', 20)).toBe('Maria Silva')
|
|
})
|
|
|
|
it('truncates at the last whole word that fits', () => {
|
|
expect(truncateNameAtWordBoundary('Fernando da Costa Lima', 12)).toBe('Fernando da…')
|
|
})
|
|
|
|
it('falls back to character slice when the first word exceeds the limit', () => {
|
|
expect(truncateNameAtWordBoundary('Supercalifragilistic', 8)).toBe('Superca…')
|
|
})
|
|
})
|