aws-lambda-mock-context
aws-lambda-mock-context copied to clipboard
Jest did not exit one second after the test run has completed.
Hi Sam,
Great package. Using this inside my Jest tests for AWS Lambda. It's not a breaking bug but maybe something to take a look at. I get the warning from Jest saying:
Jest did not exit one second after the test run has completed.
When running my unit test with --detectOpenHandles flag it returns:
const ctx = Context({
| ^
55 | timeout: 30,
56 | memoryLimitInMB: 1024
57 | });
Which means it's the creation of the context or something?
I'm I'm awaiting the ctx.Promise like so after I run my lambda function.
The flow looks like this:
const ctx = Context({
timeout: 30,
memoryLimitInMB: 1024
});
await functionblabla.main(event, ctx);
await ctx.Promise
I have 2 lambda functions and both give this warning on the Context object. Am I missing something?