/** * humanize-ssot.test.ts — ONE `humanize`. * * Audit 2026-09-24 (C-WARN-20): scaffold-component's label floor * (`render/shared.ts`) and DEV-UI-037's untranslated-floor detector each * carried a byte-identical private copy. The detector's whole point is to * recognise what the scaffolder emitted: two functions that could drift apart * would silently blind it. Both now import `lib/string-utils.humanize`. */ import { describe, it, expect } from 'vitest' import { humanize } from '../string-utils.js' import { humanize as rendererHumanize } from '../../development/frontend/component/cli/scaffold-component/render/shared.js' describe('lib/string-utils.humanize', () => { it('turns a camelCase / kebab / snake key into a spaced, first-capitalised label', () => { expect(humanize('firstName')).toBe('First Name') expect(humanize('temps-travail')).toBe('Temps travail') expect(humanize('hire_date')).toBe('Hire date') expect(humanize('IBAN')).toBe('I B A N') expect(humanize('code')).toBe('Code') }) it('is the very function scaffold-component renders the label floor with', () => { expect(rendererHumanize).toBe(humanize) }) })