-
Notifications
You must be signed in to change notification settings - Fork 0
/
test2.js
49 lines (36 loc) · 1.09 KB
/
test2.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
const { romanToInt } = require("./program2");
const assert = require("assert");
describe("test cases for problem 2 ", function () {
it("test case 1", function () {
const result = romanToInt("III");
assert.equal(3, result);
});
it("test case 2", function () {
const result = romanToInt("LVIII");
assert.equal(58, result);
});
it("test case 3", function () {
const result = romanToInt("MCMXCIV");
assert.equal(1994, result);
});
it("test case 4", function () {
const result = romanToInt("X");
assert.equal(10, result);
});
it("test case 5", function () {
const result = romanToInt("IV");
assert.equal(4, result);
});
it("test case 6", function () {
const result = romanToInt("IX");
assert.equal(9, result);
});
it("test case 7", function () {
const result = romanToInt("MMMCMXCIX");
assert.equal(3999, result);
});
it("test case 8", function () {
const result = romanToInt("");
assert.equal(0, result);
});
})