"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const pr_review_assistant_1 = require("../../walls/04-team/review/pr-review-assistant");
describe('PRReviewAssistant', () => {
    let assistant;
    beforeEach(() => {
        assistant = new pr_review_assistant_1.PRReviewAssistant();
    });
    test('generates PR summary from diff', () => {
        const diff = '+++ b/src/app.ts\n@@ -1,1 +1,1 @@\n+const x = 1;\n+++ b/src/utils.ts\n@@ -1,1 +1,1 @@\n+export const helper = () => {};';
        const summary = assistant.generateSummary('Add helper', diff, []);
        expect(summary.filesChanged).toBe(2);
        expect(summary.linesAdded).toBe(2);
    });
    test('detects console.log as potential bug', () => {
        const diff = '+++ b/src/app.ts\n@@ -1,1 +1,1 @@\n+console.log("debug");';
        const bugs = assistant.detectPotentialBugs(diff);
        expect(bugs.some((b) => b.includes('Debug statement'))).toBe(true);
    });
    test('detects .only() in tests', () => {
        const diff = '+++ b/src/test.ts\n@@ -1,1 +1,1 @@\n+it.only("test", () => {});';
        const bugs = assistant.detectPotentialBugs(diff);
        expect(bugs.some((b) => b.includes('.only()'))).toBe(true);
    });
    test('detects TODO/FIXME', () => {
        const diff = '+++ b/src/app.ts\n@@ -1,1 +1,1 @@\n+// TODO: implement this';
        const bugs = assistant.detectPotentialBugs(diff);
        expect(bugs.some((b) => b.includes('TODO'))).toBe(true);
    });
    test('getReviewChecklist returns items', () => {
        const checklist = assistant.getReviewChecklist();
        expect(checklist.length).toBeGreaterThan(0);
    });
});
//# sourceMappingURL=pr-review-assistant.test.js.map