Skip to content

Commit

Permalink
Launch: Add an all-tests configuration for Jest
Browse files Browse the repository at this point in the history
Add a launch configuration that runs all the Jest tests, without having
to open (or be on) any one of the __tests__ files. Make the new launcher
rely on the existing 'yarn test' cross-repository (standard) command.

Except for the non-applicable or replaced options, use the same options
as the ones from the sibling Jest Current File configuration. Similar to
the latter that allows debugging from a specific test suite, this new
configuration enables debugging from every (any) test suite, without
having to know which one(s) to select up-front.

To reproduce passing tests with this new launcher,
- in VS Code, go to the Run and Debug panel; then,
- select the Jest All Tests launch configuration from that menu;
- either Start Debugging or Run Without Debugging.

Signed-off-by: Marco Miller <marco.miller@ericsson.com>
  • Loading branch information
marco-miller committed Feb 8, 2022
1 parent b93a484 commit 6d0d1b8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,16 @@
"windows": {
"program": "${workspaceFolder}/node_modules/jest/bin/jest"
}
},
{
"type": "node",
"request": "launch",
"name": "Jest All Tests",
"runtimeExecutable": "yarn",
"program": "test",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"disableOptimisticBPs": true,
}
]
}

0 comments on commit 6d0d1b8

Please sign in to comment.