# test.govlab/context/core/formatters/ontology.formatter.test.ts

> 19 lines of code and 0 definitions.

Tree: Codebase Testing
Language: typescript
Canonical: https://banes-lab.com/anatomy/testing#file-testing-test-govlab-context-core-formatters-ontology-formatter-test-ts
Source text: https://banes-lab.com/source/testing/test.govlab/context/core/formatters/ontology.formatter.test.ts.txt

Listed in [test.govlab/context/core/formatters](https://banes-lab.com/api/source/testing/test.govlab/context/core/formatters.md), before [test.govlab/context/core/formatters/ontology.report.formatter.test.ts](https://banes-lab.com/source/testing/test.govlab/context/core/formatters/ontology.report.formatter.test.ts.md).

## Contained in

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

## Source

```typescript
import { coverageLines, nativeLines, summaryLines } from "@govlab/context/core/formatters/ontology.formatter.ts";
import assert from "node:assert/strict";
import { createGovlabContext } from "@govlab/context";
import { test } from "vitest";

const context = createGovlabContext();
const issues = context.validateResolution();

test("the summary opens with the report heading and carries one row per measured issue", () => {
    const lines = summaryLines(issues, context.lex.all().length, 0);
    assert.ok(lines.length > 1);
    assert.equal(new Set(lines).size, lines.length);
});

test("the coverage lines carry one row per checked collection", () => {
    const gaps = context.checkGaps();
    assert.equal(coverageLines(gaps).length, gaps.collections.length + 2);
});

test("the native lines close on the total", () => {
    const lines = nativeLines(issues);
    assert.ok(lines.at(-1)?.includes(String(issues.total)) === true);
});
```
