Created
September 6, 2019 13:39
-
-
Save tcodes0/0d65057f6bf58164487c0fd9413bb5ef to your computer and use it in GitHub Desktop.
debug jest test node vscode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// configurations is an array of objects | |
// add the object, select "Jest Tests" in debugger GUI (on the top left), add a breakpoint and hit F5! :rocket: | |
"configurations": [ | |
{ | |
"type": "node", | |
"request": "launch", | |
"name": "Jest Tests", | |
"program": "${workspaceRoot}/node_modules/jest/bin/jest.js", | |
"args": ["-i"], | |
// "preLaunchTask": "build", | |
"internalConsoleOptions": "openOnSessionStart", | |
"outFiles": ["${workspaceRoot}/dist/**/*"], | |
// "envFile": "${workspaceRoot}/.env" | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ref: https://medium.com/@mattmazzola/how-to-debug-jest-tests-with-vscode-48f003c7cb41 (fixed some stuff for my setup)