"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const config_attribution_1 = require("../../walls/03-knowledge/dna/config-attribution");
describe('ConfigAttribution', () => {
    let attribution;
    beforeEach(() => {
        attribution = new config_attribution_1.ConfigAttribution(process.cwd());
    });
    test('loads configs from project root', () => {
        const configs = attribution.loadConfigs();
        expect(Array.isArray(configs)).toBe(true);
    });
    test('attributes variable_declaration pattern', () => {
        const result = attribution.attribute('variable_declaration', 'var', 'const', []);
        expect(result.primaryCondition).toBeDefined();
        expect(result.allConditions).toBeDefined();
        expect(result.sourceFiles).toBeDefined();
    });
    test('attributes function_style pattern', () => {
        const result = attribution.attribute('function_style', 'function', 'arrow', []);
        expect(result.primaryCondition).toBeDefined();
    });
    test('returns unknown condition for empty configs', () => {
        const result = attribution.attribute('unknown_category', 'x', 'y', []);
        expect(result.primaryCondition.value).toBe('unknown');
    });
    test('getConditionTypes returns 5 types', () => {
        expect(attribution.getConditionTypes()).toHaveLength(5);
    });
    test('getStrictnessLevel defaults to moderate', () => {
        expect(attribution.getStrictnessLevel([])).toBe('moderate');
    });
    test('getLanguage defaults to javascript', () => {
        expect(attribution.getLanguage([])).toBe('javascript');
    });
    test('getFramework defaults to unknown', () => {
        expect(attribution.getFramework([])).toBe('unknown');
    });
    test('clearCache works', () => {
        attribution.loadConfigs();
        attribution.clearCache();
        expect(attribution.getLanguage([])).toBe('javascript');
    });
});
//# sourceMappingURL=config-attribution.test.js.map