Skip to content

Commit 71b4598

Browse files
committed
Update default value of context object
1 parent dc4b3bb commit 71b4598

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

README.md

+10-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,16 @@ Each execution is independent of all others, meaning that you can concurrently c
162162
- `waitTimeOverrides?`: An [object that overrides](/docs/feature-support.md#wait-state-duration-override) the wait duration of the specified `Wait` states. The specified override duration should be in milliseconds.
163163
- `retryIntervalOverrides?`: An [object that overrides](/docs/feature-support.md#retry-field-interval-override) the pause duration of the specified state's `Retry` field. The specified override duration should be a number in milliseconds; or an array of numbers, where each number represents milliseconds.
164164
- `noThrowOnAbort?`: If this option is set to `true`, aborting the execution will simply return `null` as result instead of throwing.
165-
- `context?`: An object that will be used as the [Context Object](https://docs.aws.amazon.com/step-functions/latest/dg/input-output-contextobject.html) for the execution. If not passed, the Context Object will default to an empty object. This option is useful to mock the Context Object in case your definition references it in a JSONPath.
165+
- `context?`: An object that will be used as the [Context Object](https://docs.aws.amazon.com/step-functions/latest/dg/input-output-contextobject.html) for the execution. If not passed, the Context Object will default to the following object:
166+
```js
167+
{
168+
"Execution": {
169+
"Input": /* input passed to the execution */,
170+
"StartTime": /* ISO 8601 timestamp of when the execution started */
171+
}
172+
}
173+
```
174+
This option is useful to mock the fields of the Context Object in case your definition references it in a JSONPath.
166175

167176
#### Return value
168177

0 commit comments

Comments
 (0)