# test.govlab/stats/core/loaders/manifest.loader.test.ts

> 13 lines of code and 0 definitions.

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

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

## Contained in

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

## Source

```typescript
import { BARE, INPUT } from "./stats.fixture.ts";
import { describe, expect, it } from "vitest";
import { collectWorkspace } from "@govlab/stats/core/loaders/manifest.loader.ts";

describe("collectWorkspace", () => {
    it("counts the governed modules and never more with docs than in total", () => {
        expect(INPUT.workspace.total).toBeGreaterThan(0);
        expect(INPUT.workspace.withDocs + INPUT.workspace.missingDocs.length).toBe(INPUT.workspace.total);
        expect(INPUT.workspace.withReadme + INPUT.workspace.missingReadme.length).toBe(INPUT.workspace.total);
    });

    it("counts nothing for a root with no workspace", () => {
        expect(collectWorkspace(BARE).total).toBe(0);
    });
});
```
