V13-FE-006: consolidate approved UI and contract hardening
deploy / deploy (push) Successful in 1m52s
deploy / notify (push) Successful in 1s

This commit is contained in:
2026-08-13 02:41:00 +09:00
parent d79edae546
commit 3f293d8aa8
1278 changed files with 14384 additions and 1664 deletions
@@ -1,7 +1,16 @@
import { describe, expect, it } from 'vitest'
import { formatCurrency, formatPercent, formatQuantity } from '../financial'
import { formatAsOf, formatCurrency, formatPercent, formatQuantity } from '../financial'
describe('financial formatters', () => {
it('renders missing values as an explicit em dash', () => { expect(formatCurrency(null, 'KRW')).toBe('—'); expect(formatPercent(undefined)).toBe('—') })
it('keeps percentage inputs in decimal-return units', () => { expect(formatPercent(0.125, 1)).toContain('12.5') })
it('uses bounded quantity precision', () => { expect(formatQuantity(1.234567, 2)).toContain('1.23') })
it('requires an explicit currency and preserves the currency marker', () => {
expect(formatCurrency(1234.5, 'KRW')).toContain('₩')
})
it('formats valid as-of instants in the display timezone and rejects invalid values', () => {
expect(formatAsOf('2026-08-12T00:00:00Z')).toContain('2026')
expect(formatAsOf('not-a-date')).toBe('—')
})
})