"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const database_1 = require("../walls/06-memory/database/database");
const memory_event_store_1 = require("../walls/06-memory/stores/memory-event-store");
const memory_digest_1 = require("../walls/06-memory/stores/memory-digest");
describe('Memory Digest', () => {
    beforeAll(() => { (0, database_1.getDb)(); });
    afterEach(() => {
        const db = (0, database_1.getDb)();
        db.prepare('DELETE FROM memory_events WHERE project = ?').run('digest-test');
    });
    it('generates digest', () => {
        (0, memory_event_store_1.recordMemoryEvent)({ project: 'digest-test', type: 'decision', summary: 'Use Jest', importance: 8, topic: 'testing' });
        (0, memory_event_store_1.recordMemoryEvent)({ project: 'digest-test', type: 'error', summary: 'Build failed', importance: 7, topic: 'build' });
        const digest = (0, memory_digest_1.generateMemoryDigest)('digest-test');
        expect(digest.totalEvents).toBeGreaterThanOrEqual(2);
        expect(digest.digestLines.length).toBeGreaterThan(0);
    });
});
//# sourceMappingURL=memory-digest.test.js.map