# test.govlab/docs/core/predicates/readme.predicate.test.ts

> 24 lines of code and 0 definitions.

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

Listed in [test.govlab/docs/core/predicates](https://banes-lab.com/api/source/testing/test.govlab/docs/core/predicates.md), after [test.govlab/docs/core/predicates/document.predicate.test.ts](https://banes-lab.com/source/testing/test.govlab/docs/core/predicates/document.predicate.test.ts.md) and before [test.govlab/docs/core/predicates/record.predicate.test.ts](https://banes-lab.com/source/testing/test.govlab/docs/core/predicates/record.predicate.test.ts.md).

## Contained in

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

## Source

```typescript
import { describe, expect, it } from "vitest";
import {
    isApiNote,
    isNonEmptyString,
    isRenderable,
    isStringArray,
} from "@govlab/docs/core/predicates/readme.predicate.ts";

describe("the readme predicates", () => {
    it("accept renderable manifest values and refuse empty or mixed ones", () => {
        expect([isNonEmptyString("x"), isNonEmptyString("  "), isNonEmptyString(1)]).toStrictEqual([
            true,
            false,
            false,
        ]);
        expect([isStringArray(["a"]), isStringArray([]), isStringArray(["a", ""])]).toStrictEqual([true, false, false]);
        expect([
            isRenderable("x"),
            isRenderable(["a"]),
            isRenderable([{ k: "v" }]),
            isRenderable([{ k: 1 }]),
        ]).toStrictEqual([true, true, true, false]);
        expect([isApiNote({ name: "x", note: "n" }), isApiNote({ name: "x" })]).toStrictEqual([true, false]);
    });
});
```
