-
-
Save johannesschobel/c5f0678535ef92af979b1167595ce5b4 to your computer and use it in GitHub Desktop.
vscode debug configuration for an nx configuration with jest and vscode-jest extension
This file contains hidden or 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
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
// ------- | |
// this includes launching against chorme; but assumes you have done an ng serve | |
// in a command window | |
// | |
// the vscode-jest config let's you pick an nx configuration to launch. | |
// | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "chrome", | |
"request": "launch", | |
"name": "Launch Chrome against localhost:4200", | |
"url": "http://localhost:4200", | |
"webRoot": "${workspaceFolder}/apps/frameshare" | |
}, | |
{ | |
"name": "Debug Jest Tests", | |
"type": "node", | |
"request": "launch", | |
"program": "${workspaceFolder}/node_modules/@angular/cli/bin/ng", | |
"args": [ | |
"test", | |
"${input:libName}", | |
"--runInBand=true", | |
"--codeCoverage=false" | |
], | |
"cwd": "${workspaceFolder}", | |
"console": "integratedTerminal", | |
"internalConsoleOptions": "neverOpen", | |
"trace": "all" | |
} | |
], | |
"inputs": [ | |
// these options come from the names of your libraries as enumerated in nx.json..i manually put them in the pick list | |
{ | |
"type": "pickString", | |
"id": "libName", | |
"description": "Which nx project to run jest tests to debug?", | |
"options": [ | |
"frameshare", | |
"functions", | |
"material-uishared", | |
"user", | |
"frame", | |
"fbhelper", | |
"auth" | |
], | |
"default": "frameshare" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment