You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

lambda-tester

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lambda-tester - npm Package Compare versions

Comparing version

to
2.5.0

lib/utils.js

@@ -0,1 +1,7 @@

## 2.5.0 (2016-05-14)
New:
* Added auto generated context values to better simulate Lambda environment
## 2.4.0 (2016-05-11)

@@ -2,0 +8,0 @@

@@ -5,2 +5,4 @@ 'use strict';

const utils = require( './utils' );
const DEFAULT_TIMEOUT = 3000; // s3

@@ -25,2 +27,42 @@

if( !context.functionName ) {
context.functionName = 'testLambda';
}
if( !context.functionVersion ) {
context.functionVersion = '$LATEST';
}
if( !context.memoryLimitInMB ) {
context.memoryLimitInMB = '128';
}
if( !context.logGroupName ) {
context.logGroupName = '/aws/lambda/' + context.functionName;
}
if( !context.logStreamName ) {
context.logStreamName = utils.createLogStreamName( context.functionVersion, new Date() );
}
if( !context.invokedFunctionArn ) {
context.invokedFunctionArn = utils.createFunctionArn( context.functionName );
}
if( !context.invokeid ) {
context.invokeid = utils.createId();
}
if( !context.awsRequestId ) {
context.awsRequestId = context.invokeid;
}
return context;

@@ -27,0 +69,0 @@ }

5

package.json
{
"name": "lambda-tester",
"version": "2.4.0",
"version": "2.5.0",
"description": "Unit/Integration tests for AWS Lambda handlers",

@@ -43,4 +43,5 @@ "main": "lib/index.js",

"dotenv": "^2.0.0",
"lambda-leak": "^1.0.0"
"lambda-leak": "^1.0.0",
"node-uuid": "^1.4.7"
}
}