Skip to content

Instantly share code, notes, and snippets.

@richardhyatt
Created May 5, 2017 18:52
Show Gist options
  • Select an option

  • Save richardhyatt/fcfa566900abf2d9b2ca6b1b78bb6abe to your computer and use it in GitHub Desktop.

Select an option

Save richardhyatt/fcfa566900abf2d9b2ca6b1b78bb6abe to your computer and use it in GitHub Desktop.
Unit Testing AWS Lambda Functions in Node.js #1
‘use strict’;
exports.handler = function( event, context, callback ) {
if( (event.name === ‘Richard’) || (event.name === ‘rhyatt’ ) ) {
return callback( null, { valid: true } );
}
callback( new Error( ‘unknown name’ ) );
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment