# test.build/core/formatters/learning.formatter.test.ts

> 11 lines of code and 0 definitions.

Tree: Codebase Testing
Language: typescript
Canonical: https://banes-lab.com/anatomy/testing#file-testing-test-build-core-formatters-learning-formatter-test-ts
Source text: https://banes-lab.com/source/testing/test.build/core/formatters/learning.formatter.test.ts.txt

Listed in [test.build/core/formatters](https://banes-lab.com/api/source/testing/test.build/core/formatters.md), after [test.build/core/formatters/index.formatter.test.ts](https://banes-lab.com/source/testing/test.build/core/formatters/index.formatter.test.ts.md) and before [test.build/core/formatters/link.fixture.ts](https://banes-lab.com/source/testing/test.build/core/formatters/link.fixture.ts.md).

## Contained in

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

## Source

```typescript
import { describe, expect, it } from "vitest";
import type { Block } from "@banes-lab/build-scripts/types/learning.types.ts";
import { renderLearning } from "@banes-lab/build-scripts/core/formatters/learning.formatter.ts";

const BLOCKS: readonly Block[] = [{ code: "aa", label: "Start", owner: "page", stops: [] }];

describe("renderLearning", () => {
    it("writes the blocks as one typed module with each block's label", () => {
        const module = renderLearning(BLOCKS);
        expect(module).toContain("Start");
        expect(module).toContain("export const");
    });
});
```
