# tests/core/predicates/literal.predicate.test.ts

> 16 lines of code and 0 definitions.

Tree: Coordination tree
Language: typescript
Canonical: https://banes-lab.com/anatomy/coordination#file-coordination-tests-core-predicates-literal-predicate-test-ts
Source text: https://banes-lab.com/assets/sources/source.982ca8ee3cbe656428293b14d4bf5d35dc79ee7b7de48c14d0102a78d2091fd0.generated.txt

## Source

```typescript
import { describe, it } from "node:test";
import assert from "node:assert/strict";
import { stringLiterals } from "../../../tools/core/predicates/literal.predicate.ts";

describe("stringLiterals", () => {
    it("reads each quoted literal with the line it opens on, across multi-line templates", () => {
        const source = ['const a = "one";', "const b = `two", "lines`;", "const c = 'three';"].join("\n");
        assert.deepEqual(stringLiterals(source), [
            { line: 1, value: "one" },
            { line: 2, value: "two\nlines" },
            { line: 4, value: "three" },
        ]);
    });

    it("reads an empty literal as an empty value", () => {
        assert.deepEqual(stringLiterals('x = ""'), [{ line: 1, value: "" }]);
    });
});
```
