Skip to content

Commit 12c2e5a

Browse files
authored
Update __fixtures_ names to reflect what they do (#61)
1 parent d6f25df commit 12c2e5a

18 files changed

+56
-46
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
11
import AWS from "aws-sdk";
22

33
const client = new AWS.DynamoDB();
4+
45
try {
56
const data = await client.listTables().promise();
67
console.log(data);
78
} catch (err) {
89
console.log(err, err.stack);
10+
}
11+
12+
try {
13+
const data = await client.listTagsOfResource(
14+
{ ResourceArn: "STRING_VALUE" }
15+
).promise();
16+
console.log(data);
17+
} catch (err) {
18+
console.log(err, err.stack);
919
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
11
import { DynamoDB } from "@aws-sdk/client-dynamodb";
22

33
const client = new DynamoDB();
4+
45
try {
56
const data = await client.listTables();
67
console.log(data);
78
} catch (err) {
89
console.log(err, err.stack);
10+
}
11+
12+
try {
13+
const data = await client.listTagsOfResource(
14+
{ ResourceArn: "STRING_VALUE" }
15+
);
16+
console.log(data);
17+
} catch (err) {
18+
console.log(err, err.stack);
919
}

src/transforms/v2-to-v3/__fixtures__/api-callback-multiple.input.ts

Lines changed: 0 additions & 17 deletions
This file was deleted.

src/transforms/v2-to-v3/__fixtures__/api-callback-multiple.output.ts

Lines changed: 0 additions & 17 deletions
This file was deleted.
Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
import AWS from "aws-sdk";
22

3-
const region = "us-west-2";
4-
const client = new AWS.DynamoDB({ region });
5-
client.listTables({}, function(err, data) {
3+
const client = new AWS.DynamoDB();
4+
5+
client.listTables({}, (err, data) => {
66
if (err) console.log(err, err.stack);
77
else console.log(data);
88
});
9+
10+
client.listTagsOfResource(
11+
{ ResourceArn: "STRING_VALUE" },
12+
(err, data) => {
13+
if (err) console.log(err, err.stack);
14+
else console.log(data);
15+
}
16+
);
Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
import { DynamoDB } from "@aws-sdk/client-dynamodb";
22

3-
const region = "us-west-2";
4-
const client = new DynamoDB({ region });
5-
client.listTables({}, function(err, data) {
3+
const client = new DynamoDB();
4+
5+
client.listTables({}, (err, data) => {
66
if (err) console.log(err, err.stack);
77
else console.log(data);
88
});
9+
10+
client.listTagsOfResource(
11+
{ ResourceArn: "STRING_VALUE" },
12+
(err, data) => {
13+
if (err) console.log(err, err.stack);
14+
else console.log(data);
15+
}
16+
);

src/transforms/v2-to-v3/__fixtures__/api-promise.input.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
import AWS from "aws-sdk";
22

3-
const region = "us-west-2";
4-
const client = new AWS.DynamoDB({ region });
3+
const client = new AWS.DynamoDB();
54

65
client
7-
.listTables({})
6+
.listTables()
7+
.promise()
8+
.then((data) => console.log(data))
9+
.catch((err) => console.log(err, err.stack));
10+
11+
client
12+
.listTagsOfResource({ ResourceArn: "STRING_VALUE" })
813
.promise()
914
.then((data) => console.log(data))
1015
.catch((err) => console.log(err, err.stack));
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
import { DynamoDB } from "@aws-sdk/client-dynamodb";
22

3-
const region = "us-west-2";
4-
const client = new DynamoDB({ region });
3+
const client = new DynamoDB();
54

65
client
7-
.listTables({})
6+
.listTables()
87
.then((data) => console.log(data))
98
.catch((err) => console.log(err, err.stack));
109

10+
client
11+
.listTagsOfResource({ ResourceArn: "STRING_VALUE" })
12+
.then((data) => console.log(data))
13+
.catch((err) => console.log(err, err.stack));

0 commit comments

Comments
 (0)