Functions

Static Public Summary
public

A mapping function converting one type into another.

public

Answerable<T>: Question<Promise<T>> | Question<T> | Promise<T> | T

A union type that provides a convenient way to represent any value that can be resolved by Actor#answer.

public

LoopBuilder: Object

public

Mapping<V,O>: function(item?: V, index?: number) | O

A mapping function converting one type into another.

public

Predicate<A,E>: function(actual: A, expected: E)

Static Public

public AnswerMappingFunction<V,: function(actor: AnswersQuestions) source

A mapping function converting one type into another.

public Answerable<T>: Question<Promise<T>> | Question<T> | Promise<T> | T source

A union type that provides a convenient way to represent any value that can be resolved by Actor#answer.

public LoopBuilder: Object source

Properties:

NameTypeAttributeDescription
to function(...activities: Activity[]): Loop

Examples:

Basic scenario - Iterating over a static list of items
 import { actorCalled, Loop, Log } from '@serenity-js/core';

 actorCalled('Joe').attemptsTo(
     Loop.over([ 'apple', 'banana', 'candy' ]).to(
         Log.the('current element', Loop.item<string>()),
     ),
 );

public Mapping<V,O>: function(item?: V, index?: number) | O source

A mapping function converting one type into another.

public Predicate<A,E>: function(actual: A, expected: E) source