mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2026-03-13 15:21:15 +08:00
chore: merge "Added DecimalToRoman" (#707)
* Added DecimalToRoman * add explanation * added test
This commit is contained in:
13
Conversions/test/DecimalToRoman.test.js
Normal file
13
Conversions/test/DecimalToRoman.test.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import { decimalToRoman } from '../DecimalToRoman'
|
||||
|
||||
describe('decimalToRoman', () => {
|
||||
it('expects to return correct roman numeral of given number', () => {
|
||||
expect(decimalToRoman(34)).toBe('XXXIV')
|
||||
})
|
||||
it('expects to return correct roman numeral of given number', () => {
|
||||
expect(decimalToRoman(28)).toBe('XXVIII')
|
||||
})
|
||||
it('expects to return correct roman numeral of given number', () => {
|
||||
expect(decimalToRoman(2021)).toBe('MMXXI')
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user