# test.govlab/context/configuration/strings/layer.strings.test.ts

> 20 lines of code and 0 definitions.

Tree: Codebase Testing
Language: typescript
Canonical: https://banes-lab.com/anatomy/testing#file-testing-test-govlab-context-configuration-strings-layer-strings-test-ts
Source text: https://banes-lab.com/source/testing/test.govlab/context/configuration/strings/layer.strings.test.ts.txt

Listed in [test.govlab/context/configuration/strings](https://banes-lab.com/api/source/testing/test.govlab/context/configuration/strings.md), after [test.govlab/context/configuration/strings/grammar.strings.test.ts](https://banes-lab.com/source/testing/test.govlab/context/configuration/strings/grammar.strings.test.ts.md) and before [test.govlab/context/configuration/strings/lexicon.strings.test.ts](https://banes-lab.com/source/testing/test.govlab/context/configuration/strings/lexicon.strings.test.ts.md).

## Contained in

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

## Source

```typescript
import {
    edgeKindOf,
    mechanismOf,
    scopeSeparationRule,
    tradeoffRule,
} from "@govlab/context/configuration/strings/layer.strings.ts";
import assert from "node:assert/strict";
import { test } from "vitest";

const PAIR = { a: "speed-rule", b: "care-rule", scopeA: "runtime", scopeB: "domain" };

test("the layer subjects name the edge and the tension they describe", () => {
    assert.ok(edgeKindOf("a", "b").includes("a → b"));
    assert.ok(mechanismOf("a", "b").includes("a / b"));
});

test("both tension rules name the two principles and their layers", () => {
    for (const rule of [scopeSeparationRule(PAIR), tradeoffRule(PAIR)]) {
        for (const part of Object.values(PAIR)) {
            assert.ok(rule.includes(part), part);
        }
    }
});
```
