# test.content/core/loaders/inventory.loader.test.ts

> 33 lines of code and 0 definitions.

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

Listed in [test.content/core/loaders](https://banes-lab.com/api/source/testing/test.content/core/loaders.md), after [test.content/core/loaders/coverage.loader.test.ts](https://banes-lab.com/source/testing/test.content/core/loaders/coverage.loader.test.ts.md) and before [test.content/core/loaders/leak.loader.test.ts](https://banes-lab.com/source/testing/test.content/core/loaders/leak.loader.test.ts.md).

## Contained in

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

## Source

```typescript
import { describe, expect, it } from "vitest";
import {
    inventorySourcePaths,
    inventoryTarget,
    readInventory,
    readInventorySources,
} from "@banes-lab/content/core/loaders/inventory.loader.ts";
import { relativePath } from "@ssot/paths";

describe("inventorySourcePaths", () => {
    it("names the Coordination Surface's behavior document and the avoidance reference beside the boundary documents", async () => {
        const paths = await inventorySourcePaths();
        expect(paths).toContain(relativePath("app.coordination", "AGENTS.md"));
        expect(paths.some((path) => path.startsWith(relativePath("docArch.references")))).toBe(true);
    });
});

describe("readInventorySources", () => {
    it("reads every named source whole", async () => {
        const sources = await readInventorySources();
        expect(sources.length).toBeGreaterThan(0);
        expect(sources.every((source) => source.text.length > 0)).toBe(true);
    });
});

describe("inventoryTarget", () => {
    it("resolves under the content reports folder and carries the generated marker", () => {
        expect(inventoryTarget()).toContain(".generated.");
    });
});

describe("readInventory", () => {
    it("returns either a parsed inventory or null, never a shapeless value", () => {
        const inventory = readInventory();
        expect(inventory === null || Array.isArray(inventory.records)).toBe(true);
    });
});
```
