Skip to content

Debugging in vscode with Jest Runner #2

@groffcole

Description

@groffcole

I'm trying to debug this template using vscode and the vscode-jest-runner extension. I can run the initial test successfully but when I try to debug the test I receive the following error:

SyntaxError: /.../tests/handler.test.ts: Unexpected token, expected ";" (5:38)

      3 | 
      4 | test("hello", async () => {
    > 5 |   const event = { body: "Test Body" } as APIGatewayEvent;

To summarize:

Any idea why this might be happening or how I can resolve it? It seems like the run and debug are using different jests or something like that.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions