Skip to content

Commit b08f54a

Browse files
committed
chore: use async-await in create queue
1 parent 4d3c423 commit b08f54a

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

features/sqs/step_definitions/queues.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
const { Given, Then } = require("@cucumber/cucumber");
22

3-
Given("I create a queue with the prefix name {string}", function (prefix, callback) {
3+
Given("I create a queue with the prefix name {string}", async function (prefix) {
44
const name = this.uniqueName(prefix);
5-
this.request(null, "createQueue", { QueueName: name }, callback, function () {
6-
this.queueUrl = this.data.QueueUrl;
7-
this.createdQueues.push(this.queueUrl);
8-
});
5+
const response = await this.service.createQueue({ QueueName: name });
6+
this.queueUrl = response.QueueUrl;
7+
this.createdQueues.push(this.queueUrl);
98
});
109

1110
Then("list queues should eventually return the queue urls", function (callback) {

0 commit comments

Comments
 (0)