diff --git a/lambda-function.js b/lambda-function.js index 46d7620..90d22f9 100644 --- a/lambda-function.js +++ b/lambda-function.js @@ -4,9 +4,6 @@ const lowercaseKeys = require("lowercase-keys"); async function lambdaFunction(probot, event, context) { try { - // Ends function immediately after callback - context.callbackWaitsForEmptyEventLoop = false; - // lowercase all headers to respect headers insensitivity (RFC 7230 $3.2 'Header Fields', see issue #62) const headersLowerCase = lowercaseKeys(event.headers); diff --git a/test/index.test.js b/test/index.test.js index fdeb166..830700b 100644 --- a/test/index.test.js +++ b/test/index.test.js @@ -51,10 +51,6 @@ describe("@probot/adapter-aws-lambda-serverless", () => { await fn(event, context); - expect(context).toStrictEqual({ - callbackWaitsForEmptyEventLoop: false, - }); - expect(mock.activeMocks()).toStrictEqual([]); }); @@ -88,10 +84,6 @@ describe("@probot/adapter-aws-lambda-serverless", () => { await fn(event, context); - expect(context).toStrictEqual({ - callbackWaitsForEmptyEventLoop: false, - }); - expect(mock.activeMocks()).toStrictEqual([]); }); @@ -125,10 +117,6 @@ describe("@probot/adapter-aws-lambda-serverless", () => { await fn(event, context); - expect(context).toStrictEqual({ - callbackWaitsForEmptyEventLoop: false, - }); - expect(mock.activeMocks()).toStrictEqual([]); }); @@ -162,10 +150,6 @@ describe("@probot/adapter-aws-lambda-serverless", () => { await fn(event, context); - expect(context).toStrictEqual({ - callbackWaitsForEmptyEventLoop: false, - }); - expect(mock.activeMocks()).toStrictEqual([]); }); });