Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DynamoDB: Item exists with specific values assertion #26

Merged
merged 6 commits into from
Jan 28, 2022

Conversation

joelhamiltondev
Copy link
Contributor

No description provided.

values: { [key: string]: unknown }
): Promise<TestResultOutput> {
const docClient = new AWSClient.DynamoDB.DocumentClient({
region: "us-east-1",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import the region from src/helpers/general instead of hard coding it

const docClient = new AWSClient.DynamoDB.DocumentClient({
region: "us-east-1",
});
let keys;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be simplified to

const keys = { pk: values["PK"] }
if (values["SK"] !== undefined) {
   keys.sk = values["SK"]
 }

@agwhi agwhi merged commit 2fdd531 into main Jan 28, 2022
@agwhi agwhi deleted the feat/dynamo-exist-with-specific-values-assertion branch January 28, 2022 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants