-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.d.ts
46 lines (37 loc) · 997 Bytes
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import Stepfunctions = require("aws-sdk/clients/stepfunctions")
interface SetUpOptions {
// stepFunctionsPort?: string
// lambdaPort?: string
// redisPort?: string
defaultSubnet?: string
}
interface RunOptions {
executionTimeout?: number
executionInterval?: number
}
interface CallStub {
result?: any
exception?: CallStubException
}
interface CallStubException {
type: string
message: string
}
interface CallStubs {
[functionName: string]: Array<CallStub>
}
type Execution = {
functionName: string
payload: object
}
type Result = {
executions: Array<Execution>
stepFunctionExecution: Stepfunctions.Types.DescribeExecutionOutput
stepFunctionHistory: Stepfunctions.Types.GetExecutionHistoryOutput
}
export default class TestRunner {
setUp (options?: SetUpOptions): Promise<void>
run(callStubs: CallStubs, stepFunctionDefinition: any, stepFunctionInput: any, options?: RunOptions): Promise<Result>
cleanUp(): Promise<void>
tearDown(): Promise<void>
}