我已经设置了一个打字稿+玩笑(带有ts)。
在此示例测试(项目中的唯一测试)中命中断点需要几分钟时间。这种情况只发生在WebStorm中。在具有此配置的VSCode中
"configurations": [
{
"name": "Debug Jest Tests",
"type": "node",
"request": "launch",
"args": [
"${workspaceRoot}/node_modules/jest/bin/jest.js",
"--runInBand"
],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
}
]
几乎是瞬间。
在CRA环境中调试Jest测试非常好,即使在WebStorm中也是如此。
测试:
describe('Stuff', function () {
it('should', function () {
expect(true).toBe(true); // breakpoint
});
});
回购:https://github.com/vlopp/jest-webstorm-testing
请告诉我出了什么问题,以及如何将WebStorm调试测试所需的异常时间降到最低。
更新
抛开ts似乎不能解决这个问题。
发布于 2020-01-01 12:23:03
启用JavaScript异常断点是已知的问题,请按照WEB-28989进行更新
https://stackoverflow.com/questions/59471866
复制相似问题