# zidane-ui/channels/testing/contract

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

## Functions

### `describeChannelsHostContract`

Function.

Declares the contract's cases.

```ts
function describeChannelsHostContract(
  name: string,
  harness: ChannelsHarness,
  capabilities: readonly ChannelsHostCapability[],
): void
```

**Parameters**

- `name` (`string`): The implementation's name, for the suite's title.
- `harness` (`ChannelsHarness`): Builds the implementation over a backend.
- `capabilities` (`readonly ChannelsHostCapability[]`): The members it offers.

Source: [ui/src/channels/testing/contract.ts:97](https://github.com/Tahul/zidane/blob/main/ui/src/channels/testing/contract.ts#L97)

## Constants

### `CHANNELS_HOST_CAPABILITIES`

Constant.

Every capability, for an implementation that offers them all.

```ts
const CHANNELS_HOST_CAPABILITIES: readonly ChannelsHostCapability[]
```

Source: [ui/src/channels/testing/contract.ts:40](https://github.com/Tahul/zidane/blob/main/ui/src/channels/testing/contract.ts#L40)

## Types

### `ChannelsHarness`

Type.

Builds the implementation over the contract's backend.

```ts
type ChannelsHarness = (methods: FixtureChannelsMethods) => { host: ChannelsHost } | Promise<{ host: ChannelsHost }>
```

Source: [ui/src/channels/testing/contract.ts:63](https://github.com/Tahul/zidane/blob/main/ui/src/channels/testing/contract.ts#L63)

### `ChannelsHostCapability`

Type.

A member of [`ChannelsHost`](https://zidane.si/docs/reference/ui-channels-headless.md#ChannelsHost) an implementation may offer.

```ts
type ChannelsHostCapability =
  | 'connections'
  | 'connections.create'
  | 'connections.update'
  | 'connections.remove'
  | 'connections.slack'
  | 'connections.github'
  | 'bindings'
  | 'bindings.put'
  | 'bindings.remove'
  | 'bindings.enable'
  | 'bindings.conversations'
  | 'readiness'
  | 'readiness.runFix'
  | 'testAs'
  | 'defaultProject'
  | 'alerts'
  | 'alerts.runFix'
  | 'agent'
  | 'agent.set'
```

Source: [ui/src/channels/testing/contract.ts:18](https://github.com/Tahul/zidane/blob/main/ui/src/channels/testing/contract.ts#L18)
