John Smith
John Smith

Reputation: 4363

WebStorm - debugging a Jest test - abnormal amount of time before the breakpoint is hit

I've got a typescript + jest (with ts-loader) set up.

Hitting the breakpoint in this sample test (the only test present in the project) takes a couple of minutes. This happens only in WebStorm. In VSCode with this configuration

 "configurations": [
        {
            "name": "Debug Jest Tests",
            "type": "node",
            "request": "launch",
            "args": [
                "${workspaceRoot}/node_modules/jest/bin/jest.js",
                "--runInBand"
            ],
            "console": "integratedTerminal",
            "internalConsoleOptions": "neverOpen"
        }
    ]

it was almost instant.

Debugging Jest tests in the CRA environment works just fine, even in WebStorm.

The test:

describe('Stuff', function () {
    it('should', function () {
        expect(true).toBe(true); // breakpoint
    });
});

The repo: https://github.com/vlopp/jest-webstorm-testing

Please tell me what's wrong, and how I can minimize the abnormal time that WebStorm takes to debug tests.

UPDATE

Throwing out ts-jest doesn't seem to fix the issue.

Upvotes: 0

Views: 805

Answers (1)

lena
lena

Reputation: 93868

It's a known issue with JavaScript Exception Breakpoints enabled, please follow WEB-28989 for updates

Upvotes: 1

Related Questions