add: 罗马数字转整数

This commit is contained in:
2020-05-10 18:41:04 +08:00
parent 1cacc57721
commit 02a4031bd6
3 changed files with 52 additions and 0 deletions

View File

@ -0,0 +1,8 @@
import { romanToInt } from '../../src/string/roman-to-integer'
test('罗马数字转整数', () => {
expect(romanToInt('III')).toBe(3)
expect(romanToInt('IV')).toBe(4)
expect(romanToInt('IX')).toBe(9)
expect(romanToInt('LVIII')).toBe(58)
})