Remote / foldkit-remote-domain/testing

FixtureConfig

interface · packages/remote-domain/src/testing.ts:36

interface FixtureConfig<
  A extends HostedApi,
  M extends HostedModel = HostedModel,
  W extends Layer.Layer<never, never, never> = Layer.Layer<never>,
> {
  readonly model: M
  readonly handlers?: Layer.Layer<any, never, never>
  readonly middleware?: W
  readonly bindings: Omit<LayerConfig<A>, 'principal'>
  readonly given?: ReadonlyArray<Given>
  readonly as?: string
  readonly headers?: (id: string) => Headers
  readonly through?: (client: Client<A>) => Client<A>
}

Members

FixtureConfig.model

property · packages/remote-domain/src/testing.ts:42

readonly model: M

The Domain model the Api is over: Domain.Model(…)'s class.

FixtureConfig.handlers

property · packages/remote-domain/src/testing.ts:44

readonly handlers?: Layer.Layer<any, never, never>

The Layer of the model's policies and View handlers (View.toLayer(…)).

FixtureConfig.middleware

property · packages/remote-domain/src/testing.ts:46

readonly middleware?: W

The Layers the Api's middleware needs (a session that reads the call's headers).

FixtureConfig.bindings

property · packages/remote-domain/src/testing.ts:48

readonly bindings: Omit<LayerConfig<A>, 'principal'>

What DomainRemote.layer is bound with. principal follows as.

FixtureConfig.given

property · packages/remote-domain/src/testing.ts:50

readonly given?: ReadonlyArray<Given>

Events the instances hold before the first call, committed without a command.

FixtureConfig.as

property · packages/remote-domain/src/testing.ts:52

readonly as?: string

Who the page is signed in as at the start; none is a visitor.

FixtureConfig.headers

property · packages/remote-domain/src/testing.ts:54

readonly headers?: (id: string) => Headers

The headers a call as id carries, as a session cookie would over HTTP.

FixtureConfig.through

property · packages/remote-domain/src/testing.ts:56

readonly through?: (client: Client<A>) => Client<A>

Wraps the Api's client after the actor's headers are attached, to hold or lose a reply.