"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const teach_parser_1 = require("../walls/06-memory/teach/teach-parser");
describe('Teach Parser', () => {
    it('parses numbered list', () => {
        const result = (0, teach_parser_1.parseTeachInput)('1. Minimal changes\n2. Strong typing', 'coding_style');
        expect(result.minimal_changes).toBe('Minimal changes');
        expect(result.strong_typing).toBe('Strong typing');
    });
    it('parses bullet points', () => {
        const result = (0, teach_parser_1.parseTeachInput)('- No refactors\n- No new dependencies', 'hates');
        expect(result.no_refactors).toBe('No refactors');
        expect(result.no_new_dependencies).toBe('No new dependencies');
    });
    it('parses free text', () => {
        const result = (0, teach_parser_1.parseTeachInput)('I hate over-engineering', 'hates');
        expect(result.i_hate_over_engineering).toBe('I hate over-engineering');
    });
    it('handles mixed input', () => {
        const result = (0, teach_parser_1.parseTeachInput)('1. First item\n- Second item\nThird item', 'coding_style');
        expect(Object.keys(result).length).toBe(3);
    });
    it('handles empty input', () => {
        const result = (0, teach_parser_1.parseTeachInput)('', 'coding_style');
        expect(Object.keys(result).length).toBe(0);
    });
    it('handles whitespace-only input', () => {
        const result = (0, teach_parser_1.parseTeachInput)('   \n  \n  ', 'coding_style');
        expect(Object.keys(result).length).toBe(0);
    });
    it('generates snake_case keys', () => {
        const result = (0, teach_parser_1.parseTeachInput)('I love TypeScript', 'coding_style');
        expect(result.i_love_typescript).toBe('I love TypeScript');
    });
    it('converts profile to context string', () => {
        const profile = {
            coding_style: {
                rawText: '1. Minimal changes',
                structuredData: { minimal_changes: 'Minimal changes' },
            },
            hates: {
                rawText: '- No refactors',
                structuredData: { no_refactors: 'No refactors' },
            },
        };
        const result = (0, teach_parser_1.profileToContextString)(profile);
        expect(result).toContain('Developer Profile:');
        expect(result).toContain('Coding Style: Minimal changes');
        expect(result).toContain('Hates: No refactors');
    });
    it('returns empty string for empty profile', () => {
        const result = (0, teach_parser_1.profileToContextString)({});
        expect(result).toBe('');
    });
});
//# sourceMappingURL=teach-parser.test.js.map