# test.coordination/core/generators/fixture.generator.test.ts

> 16 lines of code and 0 definitions.

Tree: Codebase Testing
Language: typescript
Canonical: https://banes-lab.com/anatomy/testing#file-testing-test-coordination-core-generators-fixture-generator-test-ts
Source text: https://banes-lab.com/source/testing/test.coordination/core/generators/fixture.generator.test.ts.txt

Listed in [test.coordination/core/generators](https://banes-lab.com/api/source/testing/test.coordination/core/generators.md), after [test.coordination/core/generators/board.generator.test.ts](https://banes-lab.com/source/testing/test.coordination/core/generators/board.generator.test.ts.md) and before [test.coordination/core/generators/venue.generator.test.ts](https://banes-lab.com/source/testing/test.coordination/core/generators/venue.generator.test.ts.md).

## Contained in

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

## Source

```typescript
import { describe, it } from "vitest";
import { existsSync, readFileSync } from "node:fs";
import assert from "node:assert/strict";
import { growFixtureTree } from "coordination-surface/tools/core/generators/fixture.generator.ts";
import { join } from "node:path";

describe("growFixtureTree", () => {
    it("writes each sample at its path under a fresh root, and removes the root on release", () => {
        const tree = growFixtureTree([
            { path: "a.md", text: "alpha" },
            { path: "nested/b.md", text: "beta" },
        ]);
        assert.equal(readFileSync(join(tree.root, "nested", "b.md"), "utf8"), "beta");
        tree.release();
        assert.equal(existsSync(tree.root), false);
    });
});
```
