Simplifies writing unit tests for AWS Lambda functions using Node.js.
- Verifies correct handler behavior
- Works asynchronously
- AWS X-Ray support [experimental]
- Detects resource leaks [experimental]
- Verifies Node.js runtime version
- Supports Promises
- Easily integrates with test frameworks (Mocha and Jasmine)
- Handlers can be loaded and removed after execution
- Lightweight and won't impact performance
- Maps the environment variable
LAMBDA_TASK_ROOT
to the application's root - Automatically loads .env files
- Works with Node 8.x
- Installation
- Getting Started
- Verifying
context.succeed()
,context.fail
andcontext.done()
- Verifying
callback()
- Verifying
Promise.resolve()
andPromise.reject()
- Custom Event Values
- Resource Leak Detection
- Detecting Handlers than Run for Too Long
- Using
lambda-tester
with Mocha and Jasmine - Loading handlers manually
- Using environment variables
- Configuration settings
- Node.js Version Verification
We'd love to get feedback on how you're using lambda-tester and things we could add to make this tool better. Feel free to contact us at [email protected]
Starting with version 3.5.0, lambda-tester supports node versions 8.11 and higher. If you require support for older versions of node, then use a previous version of lambda-tester.