Skip to content

Instantly share code, notes, and snippets.

@cindywu
Created January 30, 2023 23:34
Show Gist options
  • Save cindywu/54cccc54efea2446051a0aa1223adac3 to your computer and use it in GitHub Desktop.
Save cindywu/54cccc54efea2446051a0aa1223adac3 to your computer and use it in GitHub Desktop.
roman numeral test file
const romanToInt = require("./solution");
test("III to equal 3", () => {
expect(romanToInt("III")).toBe(3);
});
test("IV to equal 4", () => {
expect(romanToInt("IV")).toBe(4);
});
test("IX to equal 9", () => {
expect(romanToInt("IX")).toBe(9);
});
test("LVIII to equal 58", () => {
expect(romanToInt("LVIII")).toBe(58);
});
test("XL to equal 40", () => {
expect(romanToInt("XL")).toBe(40);
});
test("CM to equal 900", () => {
expect(romanToInt("CM")).toBe(900);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment