testConflictSidesAreKept

tcmts.cli.test.e2e.merge.testConflictSidesAreKept · #3pab6s6i · term

The sides of a conflict are kept: tcm todo labels each definition with its side and branch, as the merge did, after the merge and in later commands, and says how to settle it.

import { withConflicts } from "#codebase/tcmts/cli/test/e2e/merge";
import assert from "node:assert/strict";

export const testConflictSidesAreKept = () => {
  const { tcm, merged, sides } = withConflicts("merge sides kept");
  sides("lib.k", merged.out);
  const todo = tcm("todo");
  sides("lib.k", todo);
  sides("lib.m", todo);
  assert.match(
    todo,
    /tcm edit lib\.k merges them .*tcm resolve lib\.k --ours or --theirs keeps one/,
  );
}

uses