# test.govlab/docs/core/converters/document.converter.test.ts

> 21 lines of code and 0 definitions.

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

Listed in [test.govlab/docs/core/converters](https://banes-lab.com/api/source/testing/test.govlab/docs/core/converters.md), after [test.govlab/docs/core/converters/diagram.converter.test.ts](https://banes-lab.com/source/testing/test.govlab/docs/core/converters/diagram.converter.test.ts.md) and before [test.govlab/docs/core/converters/graph.converter.test.ts](https://banes-lab.com/source/testing/test.govlab/docs/core/converters/graph.converter.test.ts.md).

## Contained in

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

## Source

```typescript
import { describe, expect, it } from "vitest";
import { docNodeOf } from "@govlab/docs/core/converters/document.converter.ts";

describe("docNodeOf", () => {
    it("reads a graph node from frontmatter fields, with its edge lists", () => {
        const node = docNodeOf("docs/guides/a.guide.md", {
            concern: "scaling",
            "depends-on": "[b, c]",
            name: "a",
            status: "current",
            type: "guide",
        });
        expect(node).toMatchObject({
            concern: "scaling",
            dependsOn: ["b", "c"],
            links: [],
            name: "a",
            relPath: "docs/guides/a.guide.md",
        });
        expect(docNodeOf("x.md", {}).name).toBe("");
    });
});
```
