| 1 | import assert from "node:assert/strict"; |
| 2 | import test from "node:test"; |
| 3 | import { isThematicTitle } from "./release-title.js"; |
| 4 | |
| 5 | test("version-string titles are patch releases (compact hero)", () => { |
| 6 | assert.equal(isThematicTitle("Reasonix 1.17.14", "1.17.14"), false); |
| 7 | assert.equal(isThematicTitle("Reasonix v1.17.14", "1.17.14"), false); |
| 8 | assert.equal(isThematicTitle(" reasonix 1.17.14 ", "1.17.14"), false); |
| 9 | }); |
| 10 | |
| 11 | test("titles that merely start with the version stay thematic", () => { |
| 12 | assert.equal(isThematicTitle("Reasonix 1.18.0 — Better agents", "1.18.0"), true); |
| 13 | assert.equal( |
| 14 | isThematicTitle("A safer delivery loop, trusted MCP execution, and offline recovery", "1.17.13"), |
| 15 | true, |
| 16 | ); |
| 17 | }); |
| 18 | |
| 19 | test("edge cases stay thematic (full hero is the safe default)", () => { |
| 20 | assert.equal(isThematicTitle("", "1.17.14"), true); |
| 21 | assert.equal(isThematicTitle("Reasonix 1.17.14", ""), true); |
| 22 | }); |
| 23 |