# test.coordination/core/strings/segment.strings.test.ts

> 15 lines of code and 0 definitions.

Tree: Codebase Testing
Language: typescript
Canonical: https://banes-lab.com/anatomy/testing#file-testing-test-coordination-core-strings-segment-strings-test-ts
Source text: https://banes-lab.com/source/testing/test.coordination/core/strings/segment.strings.test.ts.txt

Listed in [test.coordination/core/strings](https://banes-lab.com/api/source/testing/test.coordination/core/strings.md), after [test.coordination/core/strings/pipeline.strings.test.ts](https://banes-lab.com/source/testing/test.coordination/core/strings/pipeline.strings.test.ts.md) and before [test.coordination/core/strings/source.strings.test.ts](https://banes-lab.com/source/testing/test.coordination/core/strings/source.strings.test.ts.md).

## Contained in

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

## Source

```typescript
import { describe, it } from "vitest";
import {
    rehearsalLine,
    segmentCounts,
    segmentSummary,
} from "coordination-surface/tools/core/strings/segment.strings.ts";
import assert from "node:assert/strict";

describe("the segment messages", () => {
    it("count the run, name the report and say when it only rehearsed", () => {
        const counts = segmentCounts(4, 3, 2, 1);
        assert.equal(counts, "scanned=4 hits=3 edits=2 rejected=1");
        assert.ok(rehearsalLine("--no-fix").includes("rerun without --no-fix"));
        assert.equal(segmentSummary("PASS", counts, "r.json", ""), `PASS  ${counts}\nreport: r.json\n`);
    });
});
```
