MessageRunOptions.app
property · packages/remote/src/scenario.ts:567
readonly app: {
readonly initial: Model
readonly update: (
model: Model,
message: Message,
) => {
readonly model: Model
}
}Remote / foldkit-remote/testing
interface · packages/remote/src/scenario.ts:566
interface MessageRunOptions<Model, Message> {
readonly app: {
readonly initial: Model
readonly update: (
model: Model,
message: Message,
) => {
readonly model: Model
}
}
readonly readers: Readonly<Record<string, (model: Model) => unknown>>
readonly judge?:
| ((
before: Model,
after: Model,
) => Option.Option<{
readonly id: string
}>)
| undefined
readonly evidence?:
| {
readonly transition: string
readonly laws: ReadonlyArray<string>
}
| undefined
}What runMessages runs over: the application, how to read its Model, and the laws that judge a step.
MessageRunOptions.appproperty · packages/remote/src/scenario.ts:567
readonly app: {
readonly initial: Model
readonly update: (
model: Model,
message: Message,
) => {
readonly model: Model
}
}MessageRunOptions.readersproperty · packages/remote/src/scenario.ts:572
readonly readers: Readonly<Record<string, (model: Model) => unknown>>Named readings of the Model, so a scenario survives a change to how the Model holds its state.
MessageRunOptions.judgeproperty · packages/remote/src/scenario.ts:574
readonly judge?:
| ((
before: Model,
after: Model,
) => Option.Option<{
readonly id: string
}>)
| undefinedThe first law the step from before to after breaks, as a contract's judge says.
MessageRunOptions.evidenceproperty · packages/remote/src/scenario.ts:578
readonly evidence?:
| {
readonly transition: string
readonly laws: ReadonlyArray<string>
}
| undefinedWith it, a scenario with no mismatch issues a Scenario record for transition against each of laws.