Skip to content

Commit

Permalink
Document how to debug unit tests in VSCode (#2297)
Browse files Browse the repository at this point in the history
## Which problem is this PR solving?
 Resolve #2118 

## Description of the changes
- Added a launch json in the README.md which explains how to set the
debugger of vscode to test unit tests with jest.

## How was this change tested?
-  Proof of work was present in the comment thread of the issue #2118 

## Checklist
- [x] I have read
https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [x] I have signed all commits
- [] I have added unit tests for the new functionality
- [] I have run lint and test steps successfully
  - for `jaeger`: `make lint test`
  - for `jaeger-ui`: `yarn lint` and `yarn test`

---------

Signed-off-by: RISHIKESHk07 <rishikeshkuppala@gmail.com>
Signed-off-by: Yuri Shkuro <github@ysh.us>
Co-authored-by: Yuri Shkuro <github@ysh.us>
  • Loading branch information
RISHIKESHk07 and yurishkuro committed May 7, 2024
1 parent 926f454 commit 9462d8d
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,37 @@ Here are some steps to follow:

See the [configuration guide](https://www.jaegertracing.io/docs/latest/frontend-ui/) for details on configuring Google Analytics tracking, menu customizations, and other aspects of UI behavior.

## Debug unit tests from Vscode (launch.json file given below)

```javascript
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Jest: current file",
"skipFiles": [
"<node_internals>/**"
],
"program": "${workspaceFolder}/node_modules/.bin/jest",
"args": [
"${file}"
],
"console": "integratedTerminal",
"cwd": "${workspaceFolder}/packages/jaeger-ui",
},

]
}

```

See the [configuration guide](https://www.jaegertracing.io/docs/latest/frontend-ui/) for details on configuring Google Analytics tracking, menu customizations, and other aspects of UI behavior.

## License

[Apache 2.0 License](./LICENSE).
Expand Down

0 comments on commit 9462d8d

Please sign in to comment.