Skip to content

Commit

Permalink
feat: add flow for creating LWC jest debug config (#3920)
Browse files Browse the repository at this point in the history
* feat: add flow for creating LWC jest debug config

* feat: changes from review.  remove typescript as option for debugger

* fix: update text for debug description based on review

* chore: update windows path for sfdx-lwc-jest
  • Loading branch information
gbockus-sf authored Mar 21, 2022
1 parent 39117b4 commit 2a1dd8e
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
32 changes: 32 additions & 0 deletions packages/salesforcedx-vscode-lwc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,38 @@
"title": "%force_lightning_lwc_test_stop_watching_all_tests_text%"
}
],
"debuggers": [
{
"type": "vscode-lwc-tests",
"label": "%force_lightning_lwc_debugger%",
"languages": [
"javascript"
],
"configurationSnippets": [
{
"label": "%force_lightning_lwc_debugger%",
"description": "%force_lightning_lwc_debugger_desc%",
"body": {
"name": "%force_lightning_lwc_debugger%",
"type": "node",
"request": "launch",
"program": "^\"\\${workspaceFolder}/node_modules/.bin/sfdx-lwc-jest\"",
"args": [
"--",
"--runInBand"
],
"cwd": "^\"\\${workspaceFolder}\"",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"disableOptimisticBPs": true,
"windows": {
"program": "^\"\\${workspaceFolder}/node_modules/@salesforce/sfdx-lwc-jest/bin/sfdx-lwc-jest\""
}
}
}
]
}
],
"configuration": {
"type": "object",
"title": "%force_lightning_lwc_preferences%",
Expand Down
4 changes: 3 additions & 1 deletion packages/salesforcedx-vscode-lwc/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,7 @@
"force_lightning_lwc_test_stop_watching_all_tests_text": "SFDX: Stop Watching All Lightning Web Component Tests",
"force_lightning_lwc_preferences": "Salesforce Lightning Web Components",
"force_lightning_lwc_remember_device_description": "Remember most recently used mobile device target.",
"force_lightning_lwc_mobile_log_level": "Log level used when calling SFDX Preview on Mobile command."
"force_lightning_lwc_mobile_log_level": "Log level used when calling SFDX Preview on Mobile command.",
"force_lightning_lwc_debugger": "Debug: LWC Jest Tests",
"force_lightning_lwc_debugger_desc": "Debug configuration for running LWC jest tests in VSCode."
}

0 comments on commit 2a1dd8e

Please sign in to comment.