# test.web/domain/converters/reason.converter.test.ts

> 17 lines of code and 0 definitions.

Tree: Codebase Testing
Language: typescript
Canonical: https://banes-lab.com/anatomy/testing#file-testing-test-web-domain-converters-reason-converter-test-ts
Source text: https://banes-lab.com/source/testing/test.web/domain/converters/reason.converter.test.ts.txt

Listed in [test.web/domain/converters](https://banes-lab.com/api/source/testing/test.web/domain/converters.md), after [test.web/domain/converters/principle.converter.test.ts](https://banes-lab.com/source/testing/test.web/domain/converters/principle.converter.test.ts.md) and before [test.web/domain/converters/reason.fragment.converter.test.ts](https://banes-lab.com/source/testing/test.web/domain/converters/reason.fragment.converter.test.ts.md).

## Contained in

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

## Source

```typescript
import { describe, expect, it } from "vitest";
import { ONTOLOGY } from "@banes-lab/web/core/generated/ontology.generated.ts";
import { spineSections } from "@banes-lab/web/domain/converters/reason.converter.ts";

describe("spineSections", () => {
    it("renders the loop, the substrate, the layers, the axes and the nodes", () => {
        const spine = spineSections(ONTOLOGY.reason, ONTOLOGY.resolution);
        expect(spine.map((section) => section.blocks?.[0]?.kind)).toStrictEqual([
            "mermaid",
            "mermaid",
            undefined,
            undefined,
            undefined,
        ]);
        expect(spine[3]?.subsections).toHaveLength(ONTOLOGY.reason.axes.length);
        expect(spine[4]?.subsections).toHaveLength(ONTOLOGY.reason.nodes.length);
    });
});
```
