lambda-event-mock
Mocking library for testing AWS Lambda events by creating realistic events that
contain dynamic data.
Features
- Easy to use builder-pattern to create mock lambda events for testing
- Works with lambda-tester
- Works with Node 8.x
Installation
Install via npm.
npm install lambda-event-mock --save-dev
Getting Started
The following example code creates an s3
lambda event for the object
picture1.gif
in the my-bucket-uploaded-pictures
bucket.
const lambdaEventMock = require( 'lambda-event-mock' );
let myMock = lambdaEventMock.s3()
.object( 'picture1.gif' )
.bucket( 'my-bucket-uploaded-pictures' )
.build();
Note that lambda-event-mock
fills in the time, date, and other properties of
the event to create a realistic looking event.
Documentation
For documentation on how to use this module in your project, please see our
documentation page.
Feedback
We'd love to get feedback on how you're using lambda-event-mock and things we
could add to make this tool better. Feel free to contact us at
feedback@vandium.io
License
BSD-3-Clause