Skip to content

zidane-ui/channels/testing/contract

import { … } from 'zidane-ui/channels/testing/contract'ui/src/channels/testing/contract.ts

Functions#

describeChannelsHostContractFunction#

Declares the contract's cases.

TypeScript
function describeChannelsHostContract(
  name: string,
  harness: ChannelsHarness,
  capabilities: readonly ChannelsHostCapability[],
): void
Parameters
NameTypeDescription
namestring

The implementation's name, for the suite's title.

harnessChannelsHarness

Builds the implementation over a backend.

capabilitiesreadonly ChannelsHostCapability[]

The members it offers.

ui/src/channels/testing/contract.ts:97

Constants#

CHANNELS_HOST_CAPABILITIESConstant#

Every capability, for an implementation that offers them all.

TypeScript
const CHANNELS_HOST_CAPABILITIES: readonly ChannelsHostCapability[]

ui/src/channels/testing/contract.ts:40

Types#

ChannelsHarnessType#

Builds the implementation over the contract's backend.

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

ui/src/channels/testing/contract.ts:63

ChannelsHostCapabilityType#

A member of ChannelsHost an implementation may offer.

TypeScript
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'

ui/src/channels/testing/contract.ts:18