Skip to content

Commit 4708cf7

Browse files
committed
fix: rm bluebird from test utils
1 parent 51db41f commit 4708cf7

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

test/utils/create-activity.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
const PromiseBlue = require('bluebird');
21
const AWS = require('aws-sdk');
32

4-
const stepfunction = new AWS.StepFunctions();
5-
const stepFunctionPromises = PromiseBlue.promisifyAll(stepfunction);
3+
const stepFunction = new AWS.StepFunctions();
64

75
const stateMachineDefinition = function (options) {
86
return {
@@ -26,10 +24,10 @@ if (!stateMachineRoleArn) {
2624
}
2725

2826
module.exports = function ({context = {}, activityName, workerName, stateMachineName}) {
29-
return stepFunctionPromises
27+
return stepFunction
3028
.createActivityAsync({
3129
name: activityName
32-
}).bind(context).then(data => {
30+
}).promise().bind(context).then(data => {
3331
context.activityArn = data.activityArn;
3432
context.workerName = workerName;
3533
}).then(function () {
@@ -38,7 +36,7 @@ module.exports = function ({context = {}, activityName, workerName, stateMachine
3836
name: stateMachineName, /* Required */
3937
roleArn: stateMachineRoleArn /* Required */
4038
};
41-
return stepFunctionPromises.createStateMachineAsync(params);
39+
return stepFunction.createStateMachineAsync(params).promise();
4240
}).then(data => {
4341
context.stateMachineArn = data.stateMachineArn;
4442
}).return(context);

0 commit comments

Comments
 (0)