Skip to content

Commit 2c5f310

Browse files
authored
chore(e2e): unset bucket synchronously (#4196)
1 parent a2098d8 commit 2c5f310

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

features/s3/step_definitions/buckets.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,15 @@ Before({ tags: "@buckets" }, function () {
66
});
77

88
After({ tags: "@buckets" }, function (callback) {
9+
const _callback = typeof callback === "function" ? callback : () => {};
910
if (this.bucket) {
1011
this.s3
1112
.deleteBucket({ Bucket: this.bucket })
1213
.catch(() => {})
13-
.then(() => {
14-
this.bucket = undefined;
15-
})
16-
.then(callback);
14+
.then(_callback);
15+
this.bucket = undefined;
1716
} else {
18-
callback();
17+
_callback();
1918
}
2019
});
2120

0 commit comments

Comments
 (0)