forked from js-temporal/temporal-polyfill
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add VS Code config for IDE debugging of tests
This commit adds a launch.json to enable easy IDE debugging of either Demitasse or (coming soon in js-temporal#41) Test262 tests. For Test262, there are two different configs: 1) Only debug the subset of tests shown in launch.json. Edit launch.json to debug other tests. Warning: commenting out the TESTS env var will debug all tests but that will take 10+ mins to run. 2) Only debug the test file currently open in the editor.
- Loading branch information
1 parent
bafa1bd
commit 8c10504
Showing
3 changed files
with
53 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -2,5 +2,6 @@ node_modules/ | |
dist/ | ||
tsc-out/ | ||
.eslintcache | ||
.vscode/ | ||
.vscode/* | ||
!.vscode/launch.json | ||
*.tgz |
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 |
---|---|---|
|
@@ -3,3 +3,4 @@ test | |
types | ||
tsconfig.json | ||
*.sh | ||
.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Test262 (edit subset in launch.json)", | ||
"request": "launch", | ||
"type": "node", | ||
"runtimeExecutable": "npm", | ||
"runtimeArgs": ["run", "test262"], | ||
"console": "integratedTerminal", | ||
"internalConsoleOptions": "neverOpen", | ||
"autoAttachChildProcesses": true, | ||
"env": { | ||
// Replace the glob pattern below with tests you want to debug. | ||
// Comment out to run all tests, but will be very slow! | ||
"TESTS": "PlainYearMonth/prototype/subtract/*.js", | ||
// Extends timeouts to 1 hour (from 10 seconds default) so you can | ||
// debug a test stopped at a breakpoint before the runner kills it. | ||
"TIMEOUT": "3600000" | ||
} | ||
}, | ||
{ | ||
"name": "Test262 (current file)", | ||
"request": "launch", | ||
"type": "node", | ||
"runtimeExecutable": "npm", | ||
"runtimeArgs": ["run", "test262"], | ||
"console": "integratedTerminal", | ||
"internalConsoleOptions": "neverOpen", | ||
"autoAttachChildProcesses": true, | ||
"env": { | ||
// Only test the currently-opened file in the IDE | ||
"TESTS": "${file}", | ||
// Extends timeouts to 1 hour (from 10 seconds default) so you can | ||
// debug a test stopped at a breakpoint before the runner kills it. | ||
"TIMEOUT": "3600000" | ||
} | ||
}, | ||
{ | ||
"name": "Demitasse tests", | ||
"request": "launch", | ||
"type": "node", | ||
"runtimeExecutable": "npm", | ||
"runtimeArgs": ["test"], | ||
"console": "integratedTerminal", | ||
"internalConsoleOptions": "neverOpen", | ||
"autoAttachChildProcesses": true, | ||
}, | ||
] | ||
} |