Skip to content

Commit

Permalink
docs(client): how to debug karma tests
Browse files Browse the repository at this point in the history
  • Loading branch information
daniellacosse committed Jan 28, 2025
1 parent a7e6a91 commit 330cb95
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,20 @@ Certain actions take configuration flags - but since we're running them through
SENTRY_DSN=<your sentry dsn> npm run action client/src/cordova/setup macos -- --buildMode=release --versionName=<your version name>
```
## Debugging Karma Tests
The test action is designed to be run in the CI - if you want to trip the debugger in a Karma test, you'll need to first drop a `debugger;` statement where you want it, then run
```sh
npx karma start client/src/www/karma.conf.js
```
This will launch a debug window, likely at `http://localhost:9876/`. Open that window in your browser and click the "Debug" button.

This will trigger a test run, but your breakpoint will not trigger as the devtools are not open. Open the Web Inspector and refresh the page - the breakpoint should trip.

Happy Debugging!

## Life of a Packet

[How does the Outline Client work?](/docs/life_of_a_packet.md)
Expand Down

0 comments on commit 330cb95

Please sign in to comment.