A Serenity/JS Screenplay Pattern-flavour
of a tagged template literal,
q is a tag function capable of resolving any Answerable<string> or Answerable<number>
you parametrise it with, and returning a QuestionAdapter<string>.
Use q to concatenate string and number values returned from synchronous an asynchronous sources.
Interpolating questions
import{ q, actorCalled }from'@serenity-js/core' import{ Send, DeleteRequest }from'@serenity-js/rest' import{ Text }from'@serenity-js/web' awaitactorCalled('Alice').attemptsTo( Send.a(DeleteRequest.to( q `/articles/${ Text.of(Article.id())}` )) )
A Serenity/JS Screenplay Pattern-flavour of a tagged template literal,
q
is a tag function capable of resolving anyAnswerable<string>
orAnswerable<number>
you parametrise it with, and returning aQuestionAdapter<string>
.Use
q
to concatenatestring
andnumber
values returned from synchronous an asynchronous sources.Interpolating questions
Using a custom description
Transforming the interpolated string
The mechanism presented below relies on
QuestionAdapter
.Learn more
Answerable
Question
Question.describedAs
QuestionAdapter