Debugging Jest on VS Code

前端 未结 4 1300
北荒
北荒 2021-01-13 07:19

I\'m trying to debug Jest unit tests using VS Code. I have the following config file settings

\"configurations\": [
    {
        \"name\": \"Debug Jest Te         


        
4条回答
  •  醉梦人生
    2021-01-13 08:19

    I can't answer the precise question, however this basic launch config for debugging Jest works for me, it's also simple to include Jest skip files

        {
          "type": "node",
          "request": "launch",
          "name": "Jest",
          "program": "${workspaceRoot}/node_modules/jest/bin/jest.js",
          "args": [
              "-i"
          ],
           "skipFiles": [
            "/**/*.js", "node_modules",
          ]
        },
    

提交回复
热议问题