Skip to content

Instantly share code, notes, and snippets.

@jacoor
Created June 26, 2019 13:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jacoor/a38b4b7c285b9540023e95cbe42edd81 to your computer and use it in GitHub Desktop.
Save jacoor/a38b4b7c285b9540023e95cbe42edd81 to your computer and use it in GitHub Desktop.
context for tests with aws lambda
import { Context } from "aws-lambda";
const context: Context = {
callbackWaitsForEmptyEventLoop: false,
functionName: "",
functionVersion: "string",
invokedFunctionArn: "string",
memoryLimitInMB: 1,
awsRequestId: "string",
logGroupName: "string",
logStreamName: "string",
getRemainingTimeInMillis: function() {
return 10;
},
done: function() {
return 10;
},
fail: function() {
return 10;
},
succeed: function() {
return 10;
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment