diff --git a/tests/learningComment.test.js b/tests/learningComment.test.js index eb74a3d..20f1fd3 100644 --- a/tests/learningComment.test.js +++ b/tests/learningComment.test.js @@ -50,7 +50,7 @@ describe("upsertLearningStatusComment — usage history accumulation", () => { const body = parseBody(post); expect(body).toContain("🔢 API 사용량 (gpt-4.1-nano)"); - expect(body).toContain("| #1 | 100 | 50 | 150 |"); + expect(body).toContain("| 1 | 100 | 50 | 150 |"); // single-row history => no totals row expect(body).not.toContain("**합계**"); // hidden marker stores an array @@ -99,9 +99,9 @@ describe("upsertLearningStatusComment — usage history accumulation", () => { const body = parseBody(patch); // all three calls present, in order - expect(body).toContain("| #1 | 100 | 50 | 150 |"); - expect(body).toContain("| #2 | 200 | 80 | 280 |"); - expect(body).toContain("| #3 | 300 | 120 | 420 |"); + expect(body).toContain("| 1 | 100 | 50 | 150 |"); + expect(body).toContain("| 2 | 200 | 80 | 280 |"); + expect(body).toContain("| 3 | 300 | 120 | 420 |"); // totals row appears once history.length > 1 expect(body).toContain("| **합계** | **600** | **250** | **850** |"); // marker is rewritten with the full array @@ -146,7 +146,7 @@ describe("upsertLearningStatusComment — usage history accumulation", () => { const patch = calls.find((c) => c.init.method === "PATCH"); const body = parseBody(patch); - expect(body).toContain("| #1 | 999 | 111 | 1,110 |"); + expect(body).toContain("| 1 | 999 | 111 | 1,110 |"); expect(body).not.toContain("**합계**"); globalThis.fetch = originalFetch; diff --git a/utils/learningComment.js b/utils/learningComment.js index 4dfad34..ed7ac0d 100644 --- a/utils/learningComment.js +++ b/utils/learningComment.js @@ -84,7 +84,7 @@ function formatUsageSection(history) { const { prompt, completion } = history[i]; const total = prompt + completion; const cost = calcCost(prompt, completion); - lines.push(`| #${i + 1} | ${fmt(prompt)} | ${fmt(completion)} | ${fmt(total)} | $${cost.toFixed(6)} |`); + lines.push(`| ${i + 1} | ${fmt(prompt)} | ${fmt(completion)} | ${fmt(total)} | $${cost.toFixed(6)} |`); totalPrompt += prompt; totalCompletion += completion; }