# test.govlab/docs/core/formatters/system.formatter.test.ts

> 28 lines of code and 0 definitions.

Tree: Codebase Testing
Language: typescript
Canonical: https://banes-lab.com/anatomy/testing#file-testing-test-govlab-docs-core-formatters-system-formatter-test-ts
Source text: https://banes-lab.com/source/testing/test.govlab/docs/core/formatters/system.formatter.test.ts.txt

Listed in [test.govlab/docs/core/formatters](https://banes-lab.com/api/source/testing/test.govlab/docs/core/formatters.md), after [test.govlab/docs/core/formatters/system.fixture.ts](https://banes-lab.com/source/testing/test.govlab/docs/core/formatters/system.fixture.ts.md) and before [test.govlab/docs/core/formatters/template.formatter.test.ts](https://banes-lab.com/source/testing/test.govlab/docs/core/formatters/template.formatter.test.ts.md).

## Contained in

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

## Source

```typescript
import {
    dataEntityDiagram,
    deploymentDiagram,
    dispatchDiagram,
    messageContractDiagram,
    securityDiagram,
    systemContextDiagram,
} from "@govlab/docs/core/formatters/system.formatter.ts";
import { describe, expect, it } from "vitest";
import { SYSTEM_MODEL } from "./system.fixture.ts";

const RENDERERS = [
    systemContextDiagram,
    dataEntityDiagram,
    deploymentDiagram,
    dispatchDiagram,
    securityDiagram,
    messageContractDiagram,
];

describe("the system diagrams", () => {
    it("each render a diagram from a populated model", () => {
        expect(RENDERERS.map((render) => (render(SYSTEM_MODEL) ?? "").length > 0)).toStrictEqual(
            RENDERERS.map(() => true),
        );
    });

    it("each render nothing when their slice of the model is empty", () => {
        expect(RENDERERS.map((render) => render({ name: "Empty" }))).toStrictEqual(RENDERERS.map(() => null));
    });
});
```
