# test.build/core/formatters/validation.formatter.test.ts

> 14 lines of code and 0 definitions.

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

Listed in [test.build/core/formatters](https://banes-lab.com/api/source/testing/test.build/core/formatters.md), after [test.build/core/formatters/tree.formatter.test.ts](https://banes-lab.com/source/testing/test.build/core/formatters/tree.formatter.test.ts.md) and before [test.build/core/formatters/vocabulary.formatter.test.ts](https://banes-lab.com/source/testing/test.build/core/formatters/vocabulary.formatter.test.ts.md).

## Contained in

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

## Source

```typescript
import { describe, expect, it } from "vitest";
import { DISCOVERY_CLEAN } from "@banes-lab/build-scripts/configuration/strings/validation.strings.ts";
import { reportOf } from "@banes-lab/build-scripts/core/formatters/validation.formatter.ts";

describe("reportOf", () => {
    it("reports a clean run in one line and otherwise lists each finding under the count", () => {
        expect(reportOf([])).toBe(DISCOVERY_CLEAN);
        const report = reportOf([{ file: "terms.html", message: "The title is empty." }]);
        expect(report.split("\n")).toStrictEqual([
            "[discovery] 1 finding(s):",
            "  terms.html  The title is empty.",
            "",
        ]);
    });
});
```
