Skip to content

Commit

Permalink
one more test
Browse files Browse the repository at this point in the history
  • Loading branch information
ogroppo committed Mar 23, 2024
1 parent 39e80ed commit b3a6e4b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/helpers/setObjectPath.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,17 @@ describe("setObjectPath", () => {
},
});
});

test("merges nested", () => {
const obj = { a: { b: { c: 1 } } };
setObjectPath(obj, "a.b.g", { lol: 1 });
expect(obj).toEqual({
a: {
b: {
c: 1,
g: { lol: 1 },
},
},
});
});
});

0 comments on commit b3a6e4b

Please sign in to comment.