# test.govlab/patterns/core/reporters/pattern.reporter.test.ts

> 14 lines of code and 0 definitions.

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

Listed in [test.govlab/patterns/core/reporters](https://banes-lab.com/api/source/testing/test.govlab/patterns/core/reporters.md).

## Contained in

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

## Source

```typescript
import { describe, expect, it, vi } from "vitest";
import { NOOP_LOGGER } from "@govlab/patterns/core/reporters/pattern.reporter.ts";
import process from "node:process";

describe("NOOP_LOGGER", () => {
    it("writes nothing when warned", () => {
        const spy = vi.spyOn(process.stderr, "write").mockImplementation(() => true);
        try {
            NOOP_LOGGER.warn("ignored", { detail: 1 });
            expect(spy).not.toHaveBeenCalled();
        } finally {
            spy.mockRestore();
        }
    });
});
```
