# test.build/core/converters/graph.fixture.ts

> 65 lines of code and 10 definitions.

Tree: Codebase Testing
Language: typescript
Canonical: https://banes-lab.com/anatomy/testing#file-testing-test-build-core-converters-graph-fixture-ts
Source text: https://banes-lab.com/source/testing/test.build/core/converters/graph.fixture.ts.txt

Listed in [test.build/core/converters](https://banes-lab.com/api/source/testing/test.build/core/converters.md), after [test.build/core/converters/graph.converter.test.ts](https://banes-lab.com/source/testing/test.build/core/converters/graph.converter.test.ts.md) and before [test.build/core/converters/graph.link.converter.test.ts](https://banes-lab.com/source/testing/test.build/core/converters/graph.link.converter.test.ts.md).

## Definitions

- `REFERENCED_BY` (lexical_declaration, line 6, exported)
- `LINKS_TO` (lexical_declaration, line 7, exported)
- `VOCABULARY` (lexical_declaration, line 9, exported)
- `graphNode` (lexical_declaration, line 21, exported)
- `plan` (lexical_declaration, line 25)
- `stop` (lexical_declaration, line 51)
- `ROUTE` (lexical_declaration, line 55, exported)
- `BUILD_TAB` (lexical_declaration, line 56, exported)
- `STOPS` (lexical_declaration, line 57, exported)
- `PLANS` (lexical_declaration, line 59, exported)

## Contained in

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

## Source

```typescript
import type { GraphNode } from "@banes-lab/web/types/graph.types.ts";
import type { RouteStop } from "@banes-lab/build-scripts/types/learning.types.ts";
import type { SectionPlan } from "@banes-lab/build-scripts/types/section.types.ts";
import type { Vocabulary } from "@banes-lab/build-scripts/types/graph.types.ts";

export const REFERENCED_BY = "referenced-by";
export const LINKS_TO = "links-to";

export const VOCABULARY: Vocabulary = {
    calls: "calls",
    contains: "contains",
    pairs: [
        { forward: "calls", reverse: "called-by" },
        { forward: "contains", reverse: "contained-in" },
        { forward: "term", reverse: "term-of" },
        { forward: "requires", reverse: REFERENCED_BY },
        { forward: "enables", reverse: REFERENCED_BY },
    ],
};

export const graphNode = function graphNode(ref: string, href: string | null): GraphNode {
    return { address: null, citation: null, fields: {}, href, kind: "k", layer: "site", number: null, ref, title: ref };
};

const plan = function plan(href: string, section: object): SectionPlan {
    return {
        identity: {
            address: { json: `/json${href}`, markdown: null },
            href,
            kind: "section",
            ref: `chapter:${href}`,
            summary: null,
            title: href,
        },
        page: {
            content: null,
            description: "",
            id: "p",
            label: "P",
            markdown: "",
            page: "p",
            path: "/p",
            tab: null,
            title: "P",
        },
        section: { id: href, title: href, ...section },
        tab: { id: null, label: "P", path: "/p", sections: [] },
    };
};

const stop = function stop(path: string, position: number): RouteStop {
    return { block: "b", code: "aa", id: path, label: path, path, position, requires: [] };
};

export const ROUTE = { description: "", label: "P", markdown: "", page: "p", path: "/p", tab: null, title: "P" };
export const BUILD_TAB = { ...ROUTE, label: "Build", path: "/p/build", tab: "build" };
export const STOPS: readonly RouteStop[] = [stop("/p#taught", 1)];

export const PLANS: readonly SectionPlan[] = [
    plan("/p#narrative", {}),
    plan("/p#taught", {
        blocks: [{ caption: "the model", kind: "mermaid" }],
        subsections: [
            {
                blocks: [
                    { kind: "text", text: "x" },
                    { code: "c", kind: "code", title: "a sample" },
                ],
            },
        ],
    }),
];
```
