"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const git_branch_pregenerator_1 = require("../../walls/03-knowledge/decisions/git-branch-pregenerator");
describe('GitBranchPreGenerator', () => {
    let generator;
    beforeEach(() => {
        generator = new git_branch_pregenerator_1.GitBranchPreGenerator();
    });
    test('parses feature branch name', () => {
        const result = generator.parseBranchName('feature/payment-gateway');
        expect(result.type).toBe('feature');
        expect(result.name).toBe('payment-gateway');
        expect(result.intent).toBe('Payment Gateway');
    });
    test('parses bugfix branch name', () => {
        const result = generator.parseBranchName('bugfix/login-crash');
        expect(result.type).toBe('bugfix');
        expect(result.name).toBe('login-crash');
    });
    test('parses refactor branch name', () => {
        const result = generator.parseBranchName('refactor/auth-module');
        expect(result.type).toBe('refactor');
    });
    test('handles branch without prefix', () => {
        const result = generator.parseBranchName('random-fix');
        expect(result.type).toBe('feature');
    });
    test('generates files for feature branch', () => {
        const files = generator.generateFiles('feature/user-auth', []);
        expect(files.length).toBeGreaterThan(0);
        expect(files.some((f) => f.type === 'model')).toBe(true);
        expect(files.some((f) => f.type === 'test')).toBe(true);
    });
    test('generates files for fix branch', () => {
        const files = generator.generateFiles('fix/login-bug', []);
        expect(files.some((f) => f.type === 'test')).toBe(true);
    });
    test('getIntentSummary returns description', () => {
        const summary = generator.getIntentSummary('feature/payments');
        expect(summary).toContain('New feature');
        expect(summary).toContain('Payments');
    });
});
//# sourceMappingURL=git-branch-pregenerator.test.js.map