test.govlab/stats/core/reporters/dependency.reporter.test.ts

test.govlab/stats/core/reporters/dependency.reporter.test.ts is a file in Codebase Testing. 11 lines of code and 0 definitions.

import { describe, expect, it } from "vitest";
import { INPUT } from "../loaders/stats.fixture.ts";
import { interactionSection } from "@govlab/stats/core/reporters/dependency.reporter.ts";

describe("interactionSection", () => {
    it("renders the package graph, and the call graph only when a module was analyzed", () => {
        const withCalls = interactionSection(INPUT.graph, INPUT.analysis);
        const withoutCalls = interactionSection(INPUT.graph, { ...INPUT.analysis, modulesAnalyzed: 0 });
        expect(withoutCalls.join("\n")).not.toContain("### Symbol call-graph");
        expect(withCalls.length).toBeGreaterThanOrEqual(withoutCalls.length);
    });
});