code for
multi-line scripts. Variables on env are available without templating:
env.MY_VAR rather than {{ env.MY_VAR }}.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
code | string | Yes | JavaScript source. |
environment | "node" | "browser" | No | Where to run the script. Defaults to node. |
fragment | boolean | No | Treat code as a fragment (no implicit return). |
timeout | number | No | Maximum time in milliseconds. |
saveAs | string | No | Name of the variable to write this step’s return value to. |
retries | number | No | Number of times to retry the step on failure before failing the test. |
skipped | boolean | No | Skip this step at execution time. |
Shorthand
JavaScript expression as a single string.env.NAME refers to a variable
directly. Do not wrap it in {{ }}.