Skip to content

Commit

Permalink
Launch: Set proper Jest config and tests locations
Browse files Browse the repository at this point in the history
Replace the no longer existing file path [1] with [2], to fix [3] upon
launching the "Jest Current File" configuration on either file under
[4,5,6] (below). These are the current Jest tests locations today.

To reproduce either [3] or passing tests with this fix,
- in VS Code, go to the Run and Debug panel; then,
- select the Jest Current File launch configuration from that menu;
- back to the Explorer panel, open either one of [4,5,6]'s files;
- either Start Debugging or Run Without Debugging while on that file.

[1] viewer-prototype/jest.config.json
[2] packages/react-components/jest.config.json
[3] Error: Can't find a root directory while resolving a config file path.
    Provided path to resolve: viewer-prototype/jest.config.json
    cwd: .../theia-trace-extension
    at _default (.../theia-trace-extension/node_modules/jest-config/build/resolveConfigPath.js:106:11)
    ...
[4] packages/react-components/src/components/__tests__
[5] packages/react-components/src/components/utils/__tests__
[6] packages/react-components/src/components/utils/filtrer-tree/__tests__

Signed-off-by: Marco Miller <marco.miller@ericsson.com>
  • Loading branch information
marco-miller committed Feb 8, 2022
1 parent 58e50fb commit b93a484
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,11 @@
"request": "launch",
"name": "Jest Current File",
"program": "${workspaceFolder}/node_modules/.bin/jest",
"cwd": "${workspaceFolder}/packages/react-components",
"args": [
"${fileBasenameNoExtension}",
"--config",
"viewer-prototype/jest.config.json"
"jest.config.json"
],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
Expand Down

0 comments on commit b93a484

Please sign in to comment.