# tests/core/inspectors/projection.inspector.test.ts

> 35 lines of code and 0 definitions.

Tree: Coordination tree
Language: typescript
Canonical: https://banes-lab.com/anatomy/coordination#file-coordination-tests-core-inspectors-projection-inspector-test-ts
Source text: https://banes-lab.com/assets/sources/source.69cb1fed808444e3ba40a3a31543dd0a29e910b0f35025e64f1d77e21d1f40b2.generated.txt

## Source

```typescript
import {
    PROJECTION_CAP_CHARS,
    PROJECTION_DEFAULT,
    PROJECTION_MARKER,
} from "../../../tools/core/constants/board.constants.ts";
import { describe, it } from "node:test";
import type { Finding } from "../../../tools/core/types/segment.types.ts";
import assert from "node:assert/strict";
import { checkProjection } from "../../../tools/core/inspectors/projection.inspector.ts";

const VENUE = "venues/release.blocking.md";

const lociOf = function lociOf(findings: readonly Finding[]): string[] {
    return findings.map((finding) => finding.locus);
};

describe("checkProjection", () => {
    it("reports a projection that still reads as no board", () => {
        assert.deepEqual(lociOf(checkProjection(`${PROJECTION_MARKER} ${PROJECTION_DEFAULT}`, [])), [
            PROJECTION_MARKER,
        ]);
    });

    it("reports a projection line past its cap before judging what it says", () => {
        const long = `${PROJECTION_MARKER} ${"x".repeat(PROJECTION_CAP_CHARS)}`;
        assert.deepEqual(lociOf(checkProjection(long, [])), [PROJECTION_MARKER]);
    });

    it("reports a blocker the line names that is not on disk", () => {
        assert.deepEqual(lociOf(checkProjection(`${PROJECTION_MARKER} blocked on ghost.blocking.md`, [])), [
            "ghost.blocking.md",
        ]);
    });

    it("reports an open blocker the line omits", () => {
        assert.deepEqual(lociOf(checkProjection(`${PROJECTION_MARKER} clear`, [VENUE])), ["release.blocking.md"]);
    });

    it("reports nothing when the line names exactly the open blockers", () => {
        assert.deepEqual(checkProjection(`${PROJECTION_MARKER} blocked on release.blocking.md`, [VENUE]), []);
    });
});
```
