Skip to content

Example ES code for testing Dynamo DB (and other AWS services.

Notifications You must be signed in to change notification settings

hr-curtissimo/example-aws-sdk-test.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example Testing DynamoDB With AWS SDK Mock

This code shows an example about how to test node.js modules that rely on the AWS SDK. It uses the AWS SDK MOCK library to do it.

An example module that could be a Lambda function or just an implementation of the repository pattern can be found in src/caller.js.

You can find two tests, one success scenario and one failure scenario, in the test/test-dynamo-with-aws-sdk-mock.js module.

After you clone the repository, restore the dependencies with

npm install

To run the tests, you can type

npx mocha

About

Example ES code for testing Dynamo DB (and other AWS services.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published