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

Support DynamoDB.DeleteItem in DynamoDB.mock() #108

Open
mark-reese opened this issue Apr 1, 2019 · 1 comment
Open

Support DynamoDB.DeleteItem in DynamoDB.mock() #108

mark-reese opened this issue Apr 1, 2019 · 1 comment

Comments

@mark-reese
Copy link

mark-reese commented Apr 1, 2019

The DynamoDB mocking already supports CreateTable, PutItem and GetItem. It would be useful to have support for DeleteItem as well.

The ASK SDK DynamoDB Persistence Adapter supports delete. If a skill uses this adapter, virtual-alexa cannot be used to test this delete functionality without a workaround.

https://github.com/alexa/alexa-skills-kit-sdk-for-nodejs/blob/2.0.x/ask-sdk-dynamodb-persistence-adapter/lib/attributes/persistence/DynamoDbPersistenceAdapter.ts

One possible workaround is to use nock inside the tests to mock the call to DeleteItem (which is what the bespoken DynamoDB. class does internally for the methods it does implement).

It would be much nicer if DeleteItem was supported within DynamoDB.class

If you approve this feature, I can submit a PR for this work.

@mark-reese mark-reese changed the title Support DynamodDB.DeleteItem in DynamoDB.mock() Support DynamoDB.DeleteItem in DynamoDB.mock() Apr 2, 2019
@allthepies
Copy link
Contributor

Hi, I added a deleteItem operation to the mock Dynamo as I needed it for some of my skills.
Hopefully bespoken will approve the pull request -> #139

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

No branches or pull requests

2 participants