import{a as r}from"./chunk-CAOKJGEV.mjs";import{a as d}from"./chunk-QPV2G662.mjs";import{a as i,b as s,g as t,h as c}from"./chunk-IFUYCFBO.mjs";import"./chunk-3PFH3U2T.mjs";import"./chunk-76CZ6Z7T.mjs";c.mock("./file-serializer",()=>({serialize:async(e,n)=>JSON.stringify(n,null,2)}));i("preprocessForConflicts + reconstructConflict",()=>{s("removes DROP keys",async()=>{let o=await r({a:1,b:d},{a:1},{a:1},"json");t(o).not.toContain("b")}),s("marks undefined fields as conflicts",async()=>{let o=await r({a:void 0},{a:1},{a:2},"json");t(o).toContain("<<<<<<< ours"),t(o).toContain(`=======
  2`),t(o).toContain(">>>>>>> theirs")}),s("handles nested objects",async()=>{let o=await r({x:{y:void 0}},{x:{y:"foo"}},{x:{y:"bar"}},"json");t(o).toMatch(/foo/),t(o).toMatch(/bar/)}),s("handles arrays with conflicts",async()=>{let o=await r({arr:[1,void 0,3]},{arr:[1,2,3]},{arr:[1,99,3]},"json");t(o).toContain("<<<<<<< ours"),t(o).toContain("99")}),s("does not break when no conflicts",async()=>{let n=await r({ok:42},{ok:42},{ok:42},"json");t(n).toContain("42"),t(n).not.toContain("<<<<<<< ours")})});
