Skip to content

Jest did not exit one second after the test run has completed. #20

Description

@noudadrichem

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions