Skip to content

Commit

Permalink
fix failing test
Browse files Browse the repository at this point in the history
Signed-off-by: Erik Kieckhafer <[email protected]>
  • Loading branch information
kieckhafer authored Jul 10, 2019
1 parent 6bf052c commit 711718f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { renameKeys } from "./ramda-ext";

test("renameKeys renames keys in a map", () => {
const input = { varA: 1, varB: 2 };
expect(renameKeys({ varA: "d" }, input)).toEqual({ varD: 1, varB: 2 });
expect(renameKeys({ varA: "varD" }, input)).toEqual({ varD: 1, varB: 2 });
});

test("renameKeys passes over missing keys", () => {
const input = { varA: 1, varB: 2 };
expect(renameKeys({ varF: "d" }, input)).toEqual({ varA: 1, varB: 2 });
expect(renameKeys({ varF: "varD" }, input)).toEqual({ varA: 1, varB: 2 });
});

0 comments on commit 711718f

Please sign in to comment.