fix(web-admin): avoid duplicate 零 in RMB uppercase for yi+rest

Add regression tests for 亿到元段间零填充。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
zlwuandCursor committed 2026-07-30 11:01:33 +08:00
1 parent e6d7eecdc6
commit 0a24f707bf
2 files changed
+11 -4

No files matched your search

+5
View File
@@ -35,4 +35,9 @@ describe('toRmbUpper', () => {
assert.ok(s.includes('角') || s.includes('分'))
assert.notEqual(s, '金额过大')
})
it('yi to yuan zero padding', () => {
assert.equal(toRmbUpper(100000001), '壹亿零壹元整')
assert.equal(toRmbUpper(100000010), '壹亿零壹拾元整')
assert.equal(toRmbUpper(100010000), '壹亿零壹万元整')
})
})