# test.govlab/docs/core/reporters/finding.reporter.test.ts

> 13 lines of code and 0 definitions.

Tree: Codebase Testing
Language: typescript
Canonical: https://banes-lab.com/anatomy/testing#file-testing-test-govlab-docs-core-reporters-finding-reporter-test-ts
Source text: https://banes-lab.com/source/testing/test.govlab/docs/core/reporters/finding.reporter.test.ts.txt

Listed in [test.govlab/docs/core/reporters](https://banes-lab.com/api/source/testing/test.govlab/docs/core/reporters.md), after [test.govlab/docs/core/reporters/base.reporter.test.ts](https://banes-lab.com/source/testing/test.govlab/docs/core/reporters/base.reporter.test.ts.md).

## Contained in

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

## Source

```typescript
import { afterEach, describe, expect, it, vi } from "vitest";
import { captureOutput } from "../coordinators/output.fixture.ts";
import { emitFindings } from "@govlab/docs/core/reporters/finding.reporter.ts";

afterEach(() => {
    vi.restoreAllMocks();
});

describe("emitFindings", () => {
    it("writes one line per finding to standard error", () => {
        const output = captureOutput();
        emitFindings("a.md", { spine: [{ detail: "no title", line: 1 }] });
        expect(output.err).toStrictEqual(["✖ a.md:1:1 [spine] no title\n"]);
    });
});
```
