diff --git a/src/helpers/setObjectPath.test.ts b/src/helpers/setObjectPath.test.ts index a0f5b98..63b8dac 100644 --- a/src/helpers/setObjectPath.test.ts +++ b/src/helpers/setObjectPath.test.ts @@ -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 }, + }, + }, + }); + }); });