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

> 11 lines of code and 0 definitions.

Tree: Codebase Testing
Language: typescript
Canonical: https://banes-lab.com/anatomy/testing#file-testing-test-govlab-stats-core-reporters-dependency-reporter-test-ts
Source text: https://banes-lab.com/source/testing/test.govlab/stats/core/reporters/dependency.reporter.test.ts.txt

Listed in [test.govlab/stats/core/reporters](https://banes-lab.com/api/source/testing/test.govlab/stats/core/reporters.md), before [test.govlab/stats/core/reporters/metric.reporter.test.ts](https://banes-lab.com/source/testing/test.govlab/stats/core/reporters/metric.reporter.test.ts.md).

## Contained in

- [test.govlab/stats/core/reporters](https://banes-lab.com/anatomy/testing/folder-testing-test-govlab-stats-core-reporters.md)

## Source

```typescript
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);
    });
});
```
