PEP-66: fix epic MCP test (title min length)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Асель 2026-11-14 03:28:15 +05:00
parent 6cceac62b2
commit 73b82d38a1

View File

@ -212,7 +212,8 @@ describe("goals, task goal and project creation over MCP", () => {
assert.match(createTask?.description ?? "", /story/i, "tool name stays, the text speaks of stories");
const a = Number(/epic #(\d+)/.exec((await call("create_epic", { project: p.key, title: "Оплата картой", description: "Приём оплат" })).text)![1]);
const b = Number(/epic #(\d+)/.exec((await call("create_epic", { project: p.key, title: "Б" })).text)![1]);
assert.ok((await call("create_epic", { project: p.key, title: "Б" })).isError, "title of at least 3 chars");
const b = Number(/epic #(\d+)/.exec((await call("create_epic", { project: p.key, title: "Эпик Б" })).text)![1]);
const t = await call("create_task", { project: p.key, title: "Форма оплаты", epic_id: a });
const key = /Created (\S+):/.exec(t.text)![1]!;
assert.equal((await core.resolveTask(db, key)).task.goalId, a);
@ -222,9 +223,9 @@ describe("goals, task goal and project creation over MCP", () => {
assert.match((await call("list_tasks", { project: p.key })).text, new RegExp(`${key} \\[backlog\\] \\(epic #${a}\\)`));
const r = await call("update_task", { task: key, epic_id: b });
assert.match(r.text, /Эпик: #\d+ Б/);
assert.match(r.text, /Эпик: #\d+ Эпик Б/);
assert.equal((await core.resolveTask(db, key)).task.status, "backlog");
assert.match((await call("get_task", { task: key })).text, /Эпик: #\d+ Б/);
assert.match((await call("get_task", { task: key })).text, /Эпик: #\d+ Эпик Б/);
const other = await project({ turns: [] });
const foreign = await core.createEpic(db, (await core.getProject(db, other.key)).id, "Чужой эпик");