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

> 10 lines of code and 0 definitions.

Tree: Codebase Testing
Language: typescript
Canonical: https://banes-lab.com/anatomy/testing#file-testing-test-web-domain-converters-failure-converter-test-ts
Source text: https://banes-lab.com/source/testing/test.web/domain/converters/failure.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/evidence.converter.test.ts](https://banes-lab.com/source/testing/test.web/domain/converters/evidence.converter.test.ts.md) and before [test.web/domain/converters/grammar.section.converter.test.ts](https://banes-lab.com/source/testing/test.web/domain/converters/grammar.section.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 { failureShapeSection } from "@banes-lab/web/domain/converters/failure.converter.ts";

describe("failureShapeSection", () => {
    it("renders one subsection per failure shape, each closed by its check", () => {
        const section = failureShapeSection(ONTOLOGY.reason, ONTOLOGY.resolution);
        expect(section.subsections).toHaveLength(ONTOLOGY.reason.failureShapes.length);
        expect(section.subsections.every((subsection) => (subsection.blocks?.length ?? 0) > 1)).toBe(true);
    });
});
```
