[API reference](https://evolu.dev/docs/api-reference) › [@evolu/common](https://evolu.dev/docs/api-reference/common) › [Fs](https://evolu.dev/docs/api-reference/common/Fs) › testCreateFs

```ts
function testCreateFs(overrides?: Partial<Fs>): Fs;
```

Defined in: [packages/common/src/Fs.ts:470](https://github.com/evoluhq/evolu/blob/dd96d79f1dbe9a49fa12ce8e0aa7d3d0177795ca/packages/common/src/Fs.ts#L470)

Creates a test [Fs](https://evolu.dev/docs/api-reference/common/Fs/interfaces/Fs) with the supplied operation overrides.

Unconfigured operations throw a defect naming the method when their Task
runs. Constructing a Task does not execute it. This helper performs no file
system I/O; overrides provide the behavior needed by each test.

### Example

```ts
import {
  assertEqual,
  assertOk,
  ok,
  testCreateFs,
  testCreateRun,
  type FsDep,
  type FsError,
  type Task,
} from "@evolu/common";

const saveMessage: Task<void, FsError, FsDep> = (run) =>
  run(run.deps.fs.writeFile("message.txt", "hello"));

await using run = testCreateRun({
  fs: testCreateFs({
    writeFile: (path, data) => () => {
      assertEqual(path, "message.txt");
      assertEqual(data, "hello");
      return ok();
    },
  }),
});

assertOk(await run(saveMessage));
```