# zidane-ui/app/testing

Import: `import { … } from 'zidane-ui/app/testing'`. Source: [ui/src/app/testing/index.ts](https://github.com/Tahul/zidane/blob/main/ui/src/app/testing/index.ts).

## Functions

### `createFixtureAppHost`

Function.

Creates an [`AppHost`](https://zidane.si/docs/reference/ui-app-headless.md#AppHost) held in memory, with each area's fixture host (`createFixtureHost`, `createFixtureOnboardingHost`).

```ts
function createFixtureAppHost(options?: FixtureAppHostOptions): AppHost
```

**Parameters**

- `options?` (`FixtureAppHostOptions`, default `{}`): Each area's fixture, or `false` to leave that area out.

**Returns** `AppHost`

Source: [ui/src/app/testing/index.ts:70](https://github.com/Tahul/zidane/blob/main/ui/src/app/testing/index.ts#L70)

## Interfaces

### `FixtureAppHostOptions`

Interface.

Options for [`createFixtureAppHost`](https://zidane.si/docs/reference/ui-app-testing.md#createFixtureAppHost): each area's fixture, or `false` to leave the area out.

```ts
interface FixtureAppHostOptions
```

**Properties**

- `appearance?` (`false | FixtureAppearanceOptions`): The appearance fixture host's options. Default: none, the app applies no appearance.
- `approvals?` (`false | FixtureApprovalsOptions`): The approvals fixture host's options: pending approvals and the safelist. Default: none pending. `false`: no approvals host.
- `chat?` (`false | ChatFixture`): The chat fixture's sessions, transcripts, models and interactions. Default: no sessions. `false`: no chat host.
- `chatOptions?` (`FixtureHostOptions`): How the chat fixture host behaves: editable, scripted replies, streaming pace.
- `composer?` (`false | FixtureComposerHostOptions`): The rich composer's fixture host: drafts, completions, ghost text. Default: none, no composer host.
- `files?` (`false | FixtureFilesHostOptions`): The files fixture host's options: the folder's files, git status and patches. Default: none, no files host.
- `git?` (`false | FixtureGitOptions`): The git fixture host's options: branches, pull requests, environment kinds and remote folders. Default: none, no git host.
- `keybindings?` (`false | FixtureKeybindingsOptions`): The keybindings fixture host's options: stored overrides. Default: none, the default bindings.
- `machines?` (`false | FixtureMachinesOptions`): The machines fixture host's options: hosts, machines, updates, tokens, the daemon. Default: none, no machines host.
- `onboarding?` (`false | FixtureOnboardingOptions`): The onboarding fixture host's options. Default: its defaults. `false`: no onboarding host.
- `palette?` (`false | FixturePaletteOptions`): The palette fixture host's options. Default: its demo data. `false`: no palette host.
- `session?` (`false | SessionFixture`): The session panels' fixture: todos, queues and artifacts. Default: none. `false`: no session host.
- `settings?` (`false | FixtureSettingsOptions`): The settings fixture host's options: stored settings, read-only. Default: none, no settings host.
- `sidebar?` (`false | FixtureSidebarHostOptions`): The sidebar fixture host's options: environment commands, Finder and windows. Default: none, no sidebar host.
- `terminal?` (`false | FixtureTerminalOptions`): The terminal fixture host's options: terminals per scope. Default: none, no terminal host.
- `workspace?` (`false | FixtureWorkspaceOptions`): The workspace fixture host's options: stored layouts and extension panels. Default: none stored. `false`: no workspace host.

Source: [ui/src/app/testing/index.ts:30](https://github.com/Tahul/zidane/blob/main/ui/src/app/testing/index.ts#L30)
