Skip to content

Instantly share code, notes, and snippets.

@richardhyatt
richardhyatt / index.js
Last active June 11, 2019 18:09
Unit Testing AWS Lambda Functions in Node.js #3
'use strict';
var expect = require( 'chai' ).expect;
var LambdaTester = require( 'lambda-tester' );
var myLambda = require( '../index' );
describe( 'myLambda', function() {
@hassy
hassy / lambda.js
Last active September 19, 2022 17:20
Different behavior of context.succeed() vs callback() in AWS Lambda
//
// Lambda's timeout needs to be >5 seconds, 10 should do
//
var startedAt = new Date();
var interval = setInterval(function () {
console.log(startedAt, new Date());
}, 1000);