Skip to content

Latest commit

 

History

History
34 lines (23 loc) · 736 Bytes

node-version-verification.md

File metadata and controls

34 lines (23 loc) · 736 Bytes

Node.js Version Verification

The default behavior of lambda-tester is to verify the version of the Node.js environment to ensure compatibility with the AWS Lambda runtime. Node.js versions of 8.x are allowed.

To disable version Verification

Version verification can be disabled several ways:

Via environment variable

LAMBDA_TESTER_NODE_VERSION_CHECK=false

Via code

// disable version checking
const LambdaTester = require( 'lambda-tester' ).noVersionCheck();

// Lambda handler
const myHandler = require( '../handler' ).handler;

describe( 'handler', function() {

	it( 'test success', function() {

		return LambdaTester( myHandler )
			.event( { name: 'Fred' } )
			.expectResult();
	});
});