import assert from "node:assert/strict"; import test from "node:test"; import { takeEditDeprecation, warnTakeEdit } from "./takeDeprecation.mjs"; test("the take-patch edits' deprecation: one line, naming the flag and the way there", () => { const line = takeEditDeprecation("window --take", { project: "reports/x", take: "v2" }); assert.equal(line, "umtool: window --take is deprecated -- edits land in the draft now; open the take there first (umtool takes open reports/x v2) and edit without it"); assert.doesNotMatch(line, /\n/); const said = []; warnTakeEdit("--in-take", {}, (s) => said.push(s)); assert.deepEqual(said, ["umtool: --in-take is deprecated -- edits land in the draft now; open the take there first (umtool takes open