Skip to content

diff.ts: Write tests for three-way merge conflict detection #703

Description

@Kingsman-99

Description

src/diff.ts implements three-way diff/merge for invoice state reconciliation, but only two-way diff tests exist. The three-way merge conflict path — where both the local and remote branches have modified the same field — has no coverage.

Acceptance Criteria

  • Test: both branches modify the same field → MergeConflict error is thrown with the conflicting field name
  • Test: one branch modifies a field, the other does not → merge succeeds with the modified value
  • Test: neither branch modifies a field → merge succeeds with the base value
  • Unit tests pass

Context

  • Target file: src/diff.ts
  • Tests should live in src/__tests__/diff.test.ts

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions