VS Code debug jest测试用例

添加如下配置:

VS Code debug jest测试用例_第1张图片

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Debug Jest Tests",
            "type": "node",
            "request": "launch",
            "runtimeArgs": [
                "--inspect-brk",
                "${workspaceRoot}/node_modules/jest/bin/jest.js",
                "--runInBand",
                "--testEnvironment",
                "jsdom",
                "--testResultsProcessor=jest-junit",
                "--coverage"
            ],
            "console": "integratedTerminal",
            "internalConsoleOptions": "neverOpen",
            "port": 9229
        }
    ]
}

你可能感兴趣的:(vscode,测试用例)