无法通过vs代码调试玩笑-获取错误无法从<project folder =“”>

时间:2019-04-16 10:49:16

标签: javascript visual-studio-code jestjs babeljs vscode-debugger

我正在尝试在vscode中调试Jest测试,但没有成功。 请帮助我了解原因。

我有以下launch.json

    "version": "0.2.0",
    "configurations": [
        {
            "type": "node",
            "request": "launch",
            "name": "All Test Files",
            "args": [
                "--colors",
                "--runInBand",
                "--coverage"
            ],
            "console": "integratedTerminal",
            "internalConsoleOptions": "neverOpen",
            "disableOptimisticBPs": true,
            "env": {
                "NODE_ENV": "development"
            },
            "windows": {
                "program": "${workspaceFolder}/node_modules/jest/bin/jest",
            },
            "cwd": "${workspaceRoot}"
        }
]

我在测试文件中放置了一些断点,当我运行denug(F5)时出现此错误:

 Test suite failed to run

    Cannot find module '@babel/plugin-proposal-class-properties' from 'C:\Source\my-app'

我无法调试测试。

测试与纱线测试完美配合

0 个答案:

没有答案