Skip to content

Instantly share code, notes, and snippets.

@sumn2u
Created April 6, 2023 14:52
Show Gist options
  • Save sumn2u/64167ad25105fd8aadca0829f7a4748f to your computer and use it in GitHub Desktop.
Save sumn2u/64167ad25105fd8aadca0829f7a4748f to your computer and use it in GitHub Desktop.
Launch configurations for debugging jest test spec and application
{
"version": "0.2.0",
"configurations": [
{
"name": "Run Chrome",
"type": "chrome",
"request": "launch",
"url": "http://localhost:8080",
"webRoot": "${workspaceRoot}/src",
"sourceMaps": true
},
{
"type": "node",
"request": "launch",
"name": "Test Spec File",
"program": "${workspaceRoot}/node_modules/jest/bin/jest.js",
"args": [
"--collectCoverage=false",
"--colors",
"--config",
"${workspaceRoot}/jest.config.js",
"--runInBand",
"--runTestsByPath",
"${relativeFile}",
"--testPathPattern=${fileDirname}",
"--testTimeout=10000000"
],
"outputCapture": "std",
"internalConsoleOptions": "openOnSessionStart",
"envFile": "${workspaceRoot}/.env",
"skipFiles": [
"${workspaceRoot}/../../node_modules/**/*",
"<node_internals>/**/*"
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment