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

fix: Fixes the undefined error when running Table.transactGet #124

Merged
merged 4 commits into from
Jan 11, 2021

Conversation

kcwinner
Copy link

@kcwinner kcwinner commented Jan 9, 2021

Fixes: #120

  • Adding in integration tests using testcontainers.
  • Fixing the res.Item when parsing the entity in Table.transactGet

I didn't add the jest integ stuff to the tests because I don't know your thoughts on all this.

… when parsing the entity in Table.transactGet
@jeremydaly
Copy link
Owner

Hi @kcwinner. Thanks for this! Can you remove the integration tests for now and I'll merge this in? I have a ton of work done using dynalite, but I need to rethink this if transactions are supported.

@jeremydaly jeremydaly merged commit e688bb1 into jeremydaly:master Jan 11, 2021
@kcwinner
Copy link
Author

@jeremydaly done! Let me know if you need anything. I'll keep the branch locally in case you want to use any of it later.

Here is where I've used the testcontainers with dynamodb local.

@jeremydaly
Copy link
Owner

Thanks, @kcwinner. I've merged the change and will check out the DynamoDB local stuff.

@jeremydaly
Copy link
Owner

FYI, I made a slight modification with 7eedde8 to do the Item check before the parsing happens. If no item is found, the DDB API returns {}, but if we run it through the parser first, it'll return { Item: {} } which is inconsistent.

@kcwinner
Copy link
Author

Ah that makes sense!

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.

Table.transactGet - Cannot read property 'Item' of undefined
2 participants