-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(testing): Unify VSCode debug config (#4117)
For a long time, we've had the following TODO in our VSCode `launch.json` (debug config) file: ``` // TODO: these are all alike save the package, so figure out how to make that variable ``` which was there because we had an ever-expanding number of nearly identical configurations, one per package. Each time we wanted to debug the tests in a new package, we had to copy and paste and make a new PR to get it on `master`. It was inefficient and frankly kind of a pain. When the need for yet another package's tests to be debugged came up, rather than continue the madness, I finally answered that TODO. This does a few things to make that happen: - Add an `inputs` section to the debug configuration, to allow more than the standard values in the config to be dynamic. - Include a command for reading the one part of the config that has been different per config entry - the package name - off of the open test file. - Use that command in the now-unified debug config. - Add the VSCode extension[1] which enables the input command to the list of recommended extensions, and a note about it to `launch.json`. - Add a "Debugging Tests" section to `CONTRIBUTING.md` explaining how to use the debugger. There's also a small amount of cleanup done to both the newly-unified config entry and the one other remaining one (which runs nextjs integration tests). [1] https://marketplace.visualstudio.com/items?itemName=augustocdias.tasks-shell-input
- Loading branch information
1 parent
8f51ef7
commit 9f1374d
Showing
3 changed files
with
56 additions
and
113 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
{ | ||
// See http://go.microsoft.com/fwlink/?LinkId=827846 | ||
// for the documentation about the extensions.json format | ||
"recommendations": ["esbenp.prettier-vscode", "dbaeumer.vscode-eslint"] | ||
"recommendations": [ | ||
"esbenp.prettier-vscode", | ||
"dbaeumer.vscode-eslint", | ||
"augustocdias.tasks-shell-input" | ||
], | ||
} |
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
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