Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Then(/(?:he|she|they) should get a result of ([\d-.]+)/, function (this: WithStage, expectedResult: string) {
return this.stage.theActorInTheSpotlight().attemptsTo(
VerifyResultAt(LastResponse.header('location'), equals({ result: Number(expectedResult) })),
);
});
export const RequestCalculationOf = (expression: string) =>
Task.where(`#actor requests calculation of ${ expression }`,
Send.a(
PostRequest.to('/api/calculations').with(expression).using({ headers: { 'Content-Type': 'text/plain' }}),
),
Ensure.that(LastResponse.status(), equals(201)),
Ensure.that(LastResponse.header('location'), startsWith('/api/calculations/')),
);