美文网首页
VSCode 调试Jest

VSCode 调试Jest

作者: sovran | 来源:发表于2019-04-16 17:51 被阅读0次

VSCode 调试Jest

添加配置

{
    "type": "node",
    "request": "launch",
    "protocol": "inspector",
    "name": "Jest Debug",
    "program": "${workspaceRoot}/node_modules/jest/bin/jest",
    "stopOnEntry": false,
    "args": ["--runInBand", "--env=jsdom", "${fileBasename}"],
    "runtimeArgs": [
        "--inspect-brk"
        ],
        "cwd": "${workspaceRoot}",
        "sourceMaps": true,
        "console": "integratedTerminal"
}

test文件 按F5快捷键

相关文章

网友评论

      本文标题:VSCode 调试Jest

      本文链接:https://www.haomeiwen.com/subject/yfkiwqtx.html