Skip to content

Commit

Permalink
Added debug mode for testing with debuggers (#894)
Browse files Browse the repository at this point in the history
* Added debug mode for testing with debuggers

* Removed windows specific test:debug script

* Removed windows instructions for debugging from readme

* Change test:debug to use yarn instead of node to resolve bin files
  • Loading branch information
BelfordZ authored Aug 24, 2022
1 parent f6dd6e5 commit a7c8ca3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,13 @@ console.log(datamodel.flatState); // {infura: {...}, contractExchangeRates: [...

Run `yarn test` to run the tests once. To run tests on file changes, run `yarn test:watch`.

To enable debugger [via Chrome DevTools](https://jestjs.io/docs/troubleshooting#tests-are-failing-and-you-dont-know-why):

1. run `yarn test:debug`
2. navigate to `chrome://inspect`
3. click "Open Dedicated DevTools for Node". Keep the DevTools window open
4. stop/rerun the tests as needed

Run `yarn lint` to run the linter, or run `yarn lint:fix` to run the linter and fix any automatically fixable issues.

### Linking During Development
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"prepack": "./scripts/prepack.sh",
"setup": "yarn install",
"test": "jest",
"test:debug": "yarn run --inspect-brk jest --runInBand",
"test:watch": "jest --watch"
},
"dependencies": {
Expand Down

0 comments on commit a7c8ca3

Please sign in to comment.