// @vitest-environment node
import { describe, it, expect, vi } from "vitest";
describe("phaseBacklinks", () => {
    it("returns phase=6, name='backlinks', counts applied+proposed correctly", async () => {
        const mockRun = vi.fn().mockResolvedValue({
            records: [{ get: (k) => (k === "applied" ? 3 : 5) }],
        });
        const ctx = {
            accountId: "acc-1",
            session: { run: mockRun },
            config: {},
        };
        const { phaseBacklinks } = await import("../dream-cycle/phase-backlinks.js");
        const result = await phaseBacklinks(ctx);
        expect(result.phase).toBe(6);
        expect(result.name).toBe("backlinks");
        expect(result.applied).toBe(3);
        expect(result.proposed).toBe(5);
        expect(result.deferred).toBe(0);
        expect(result.durationSec).toBeGreaterThanOrEqual(0);
        expect(mockRun).toHaveBeenCalledOnce();
    });
});
//# sourceMappingURL=phase-backlinks.test.js.map