# test.govlab/docs/core/loaders/diagram.loader.test.ts

> 12 lines of code and 0 definitions.

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

Listed in [test.govlab/docs/core/loaders](https://banes-lab.com/api/source/testing/test.govlab/docs/core/loaders.md), after [test.govlab/docs/core/loaders/code.loader.test.ts](https://banes-lab.com/source/testing/test.govlab/docs/core/loaders/code.loader.test.ts.md) and before [test.govlab/docs/core/loaders/manifest.loader.test.ts](https://banes-lab.com/source/testing/test.govlab/docs/core/loaders/manifest.loader.test.ts.md).

## Contained in

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

## Source

```typescript
import { describe, expect, it } from "vitest";
import { DIAGRAM_KINDS } from "@govlab/docs/core/loaders/diagram.loader.ts";

describe("DIAGRAM_KINDS", () => {
    it("discovers every diagram plugin, ordered, with the lifecycle first", () => {
        const orders = DIAGRAM_KINDS.map((kind) => kind.order);
        expect(orders).toStrictEqual(orders.toSorted((left, right) => left - right));
        expect(DIAGRAM_KINDS[0]?.id).toBe("lifecycle");
        expect(DIAGRAM_KINDS.map((kind) => kind.id)).toEqual(
            expect.arrayContaining(["data-flow", "sequence", "state", "type-relationship"]),
        );
    });
});
```
