Skip to content

Commit 21e1adc

Browse files
committed
Added tests for the lookup function
1 parent 371eb7e commit 21e1adc

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

Sprint-2/implement/lookup.test.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
const createLookup = require("./lookup.js");
22

3-
test.todo("creates a country currency code lookup for multiple codes");
3+
test("creates a country currency code lookup for multiple codes", () => {
4+
const pairs = [
5+
["US", "USD"],
6+
["CA", "CAD"],
7+
];
8+
const result = createLookup(pairs);
9+
10+
expect(result).toEqual({
11+
US: "USD",
12+
CA: "CAD",
13+
});
14+
});
415

516
/*
617

0 commit comments

Comments
 (0)