Skip to content

Commit

Permalink
Added debug mode for testing with debuggers
Browse files Browse the repository at this point in the history
  • Loading branch information
BelfordZ committed Aug 23, 2022
1 parent e3cd8e3 commit ae81926
Show file tree
Hide file tree
Showing 2 changed files with 9 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` (for Windows: `yarn test:debug:windows`)
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
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
"prepack": "./scripts/prepack.sh",
"setup": "yarn install",
"test": "jest",
"test:debug": "node --inspect-brk node_modules/.bin/jest --runInBand",
"test:debug:windows": "node --inspect-brk ./node_modules/jest/bin/jest.js --runInBand",
"test:watch": "jest --watch"
},
"dependencies": {
Expand Down

0 comments on commit ae81926

Please sign in to comment.