Skip to content

Commit e098bba

Browse files
Add test for invert function to verify key-value swapping behavior
1 parent f998538 commit e098bba

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Sprint-2/interpret/invert.test.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
const invert = require("./invert.js");
2+
test("swap the keys and values in the object", () => {
3+
expect(invert({ a: 1, asd: "d3e" })).toEqual({ 1: "a", d3e: "asd" });
4+
});

0 commit comments

Comments
 (0)