Skip to content
This repository was archived by the owner on Jan 26, 2019. It is now read-only.
This repository was archived by the owner on Jan 26, 2019. It is now read-only.

The recommended debug launch configuration for jest doesn't work with react-scripts-ts OR How to debug jest tests? #276

Open
@mattmazzola

Description

@mattmazzola

I'm trying to debug my jest tests by following instructions from the original create-react-app:
https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#debugging-tests-in-visual-studio-code

However, it seems react-scripts-ts are not accepting the command line arguments the launch config passes.

image

image

image

I also tried the other method:
https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#debugging-tests-in-chrome

but it has the same issue since it's essentially running the same command but through npm script instead of VScode launcher.

Seems VSCode is properly generating a port to debug node on; however, react-scripts isn't understanding the CLI arg and fails to run, thus there is timeout as the debugger can never attach to process since it was never started.

Is there an alternative launch config for debugging jest tests that works with react-scripts-ts?

Is there maybe some upstream change in react-scripts that would enable it work?

If there another method recommended for debugging jest tests with react-scripts-ts?

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