Skip to content

Commit

Permalink
Add test for waiter
Browse files Browse the repository at this point in the history
  • Loading branch information
trivikr committed Dec 27, 2022
1 parent c4dc7c5 commit 949b88b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/transforms/v2-to-v3/__fixtures__/waitFor-await.input.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import AWS from "aws-sdk";

const Bucket = "BUCKET_NAME";
const client = new AWS.S3({ region: "REGION" });

await client.createBucket({ Bucket }).promise();
await client.waitFor("bucketExists", { Bucket }).promise();
7 changes: 7 additions & 0 deletions src/transforms/v2-to-v3/__fixtures__/waitFor-await.output.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { S3, waitUntilBucketExists } from "@aws-sdk/client-s3";

const Bucket = "BUCKET_NAME";
const client = new S3({ region: "REGION" });

await client.createBucket({ Bucket });
await waitUntilBucketExists({ client, maxWaitTime: 60 }, { Bucket });

0 comments on commit 949b88b

Please sign in to comment.