Skip to content

Commit

Permalink
馃憯 allow Jest VSCode extension to run successfully on startup (#6810)
Browse files Browse the repository at this point in the history
* 鈿★笍 allow Jest VSCode extension to run on startup
- Latest Jest VSCode extension has great support for the new Testing sidebar - easy detection without having to run the full test suite

* Add debug launcher as well

* Fixed a jest.autoRun setting to ensure you always get accurate results
- Picked up here: https://github.com/jest-community/vscode-jest/blob/master/README.md#how-to-trigger-the-test-run
  • Loading branch information
barrymay committed Oct 15, 2021
1 parent 3ac74f9 commit 73e745d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
15 changes: 15 additions & 0 deletions .vscode/launch.json
@@ -0,0 +1,15 @@
{
"configurations": [
{
"type": "node",
"name": "vscode-jest-tests",
"request": "launch",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"disableOptimisticBPs": true,
"cwd": "${workspaceFolder}",
"runtimeExecutable": "yarn",
"args": ["test", "--runInBand", "--watchAll=false"]
}
]
}
8 changes: 7 additions & 1 deletion .vscode/settings.json
Expand Up @@ -2,5 +2,11 @@
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"typescript.tsdk": "node_modules/typescript/lib"
"typescript.tsdk": "node_modules/typescript/lib",
"jest.jestCommandLine": "yarn test",
"jest.autoRun": {
"watch": false,
"onSave": "test-file",
"onStartup": ["all-tests"]
}
}

0 comments on commit 73e745d

Please sign in to comment.